On 02/12/2016 06:52 PM, deadalnix wrote:
Providing some metadata in the allocate is in itself a good idea.
Locating these data with the object is usually not :
  - Mutating the metadata will create sharing overhead on the whole
cache line. Sharing of immutable would become inefficient.
  - It tends to create allocation size that aren't friendly to
underlying allocators. For instance, an alocation of size 2^n + 8 bumps
you to the next size class, often 2^(n+1) or alike. This creates a lot
of internal fragmentation.
  - Buffer overflow/underflow WILL spill in the alocator metadata. You
don't want that. This pretty much guaranteed that the worse thing that
can happen will happen: corrupting the alocator.

jemalloc moved away from using them for small runs for these reasons.

I think we're good there. -- Andrei

Reply via email to