On Sun, 15 Apr 2012, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Btw, I pushed a few small fixes to be able to compile with GJAlloc in rtldebug mode (when you're developing C modules, I really recommend that mode, btw). I'm not that happy with the condition I put into BLOCK_ALLOC_IN_USE, though. I thought block_allocator.pages would be better, but that doesn't work with BA_USE_MEMALIGN. I hope you can come up with something better.
I think num_pages does well for this purpose. Otherwise one would have to check the several linked list. I am not sure if its worth keeping the BA_USE_MEMALIGN mode. The idea was to be able to skip the hashtable completely when allocator pages are aligned. In or benchmarks it did not really give any improvement and allocating alot of memory with huge alignment might lead to strange fragmentation issues on some systems.