[PATCH] Add a chunk_aligned_alloc function handling alignment constraints on chunks
jasone at canonware.com
Wed Apr 11 20:20:11 PDT 2012
On Apr 11, 2012, at 5:24 AM, Mike Hommey wrote:
> Since I don't think it makes sense to emulate sbrk in jemalloc,
> chunk_dss should be completely disabled there. How would you feel about
> a patch that doesn't build chunk_dss.c and sets all functions declared in
> chunk_dss.h to be dummy inline functions when dss is not enabled? That
> would allow to keep the if (config_dss) parts and avoid replacing them
> with #ifdefs. Or are you just fine with replacing them with #ifdefs?
I'd like to avoid conditional compilation as much as possible, in order to reduce the frequency of regressions that break compilation for an obscure combination of configuration options. One way of minimizing the impact might be to detect the presence of sbrk(), create a stub replacement (with a not_implemented() body) if it's missing, and force config_dss to false.
More information about the jemalloc-discuss