1. 20 Aug, 2018 1 commit
  2. 06 Aug, 2018 1 commit
    • Swann Perarnau's avatar
      [fix] Force mbind on allocation from arena · 759ec35a
      Swann Perarnau authored
      The way jemalloc handles big allocations can often result in surprising
      calls to mmap/mbind (splitting allocations, rounded up sizes). It also
      makes the path between an aml_alloc and mbind quite difficult to see.
      More worrying, if jemalloc reuses a previous allocation, the mbind will
      not be called again, which might result in the wrong binding happening.
      
      To fix those issues, we move the mbind logic to be around the
      allocations returned from jemalloc. This will ensure that we always bind
      properly. The only issue is that it might slow down allocations.
      
      It can also cause issues if the same arena is used by multiple areas, as
      allocations might be overlapping a page. We will move away from sharing
      arenas for benchmarks from now on.
      759ec35a
  3. 23 Mar, 2018 1 commit
  4. 22 Mar, 2018 1 commit
  5. 11 Mar, 2018 1 commit
    • Swann Perarnau's avatar
      [fix] area_binding should create the binding · f79e5b43
      Swann Perarnau authored
      As we cannot find out in advance the binding an area uses, it is not
      possible to use a correctly allocated pointer to aml_area_binding.
      
      Fixes a segfault we observed outside of current unit-tests.
      f79e5b43
  6. 08 Mar, 2018 2 commits
  7. 01 Feb, 2018 1 commit
    • Swann Perarnau's avatar
      [refactor] new version of the API · a002945c
      Swann Perarnau authored
      This is the result of countless interations on the internal design of
      the various building blocks we want to have for this library.
      
      At this point, I hope that this is stable enough. There are still some
      tweaks needed here and there, but the core is implemented AND tested.
      
      Some of the design decisions made:
      - all functions are public, but most are not meant to be used directly.
      - intended public functions take "generic" structs as arguments
      - intended actual implementations rely on more complex structures, with
      their own family of data and operators.
      - split all objects between data and operator structs.
      
      Exemple:
      - area.c and arena.c are generic dispatch functions to call the actual,
        specific implementations.
      - struct aml_area and struct_aml_arena are the same.
      
      Currently implement:
      - 2 area types: posix (malloc) and linux (numa).
      - 1 arena type: jemalloc
      a002945c