Hi Lu,
This is mostly because up until very recently the header size of an allocation was 64 bytes in size. We've shrunk that down to 16 bytes, so now it's more
realistic to actually create small allocation classes (< 64), but doing that without breaking the on-media layout would be a non trivial effort.
Having said that, I've attached a very simple patch (for current master) that reduces the smallest allocation size to 16 bytes of usable space.
I do not recommend using it beyond testing, and this patch breaks backward compatibility of libpmemobj.
If you feel this is something we should support, please feel free to create a feature request in our github issues repository -
https://github.com/pmem/issues/issues.
Piotr
W dniu piątek, 7 lipca 2017 00:34:22 UTC+2 użytkownik Lu napisał:Hi,
It seems the minimum allocation size of libpmemobj is 128 bytes, maybe determined by the MIN_RUN_SIZE configuration. I'm curious why choosing this size as the minimum allocation size instead of some smaller values i.e. 16? If my program allocates a lot of small objects wouldn't this cause much internal fragmentation?
Regards,
Lu