snmalloc
snmalloc copied to clipboard
Maybe missing _base variants in overrides
Continuing the discussion from #631 since that one is closed....
After applying the patch that also overrides _msize_base
, the project compiles. but got greeted with many "Not allocated by this allocator" error.
Running dumpbin /SYMBOLS
on the ucrt lib shows there is a _base
variant for many other heap related APIs.
I wonder these information that might requires some microsoft internal employee's knowledge:
- Why these _base variant calls appeared in the final binary when no source code referenced them?
- Should snmalloc provide overrides for them too?
my fork seems to workaround existing issue, though it seems you also need to implement _recalloc
and maybe _recalloc_base
CC @mjp41
The jemalloc compat basically has _recalloc
. If you specialise to the flag being set to say it should be zeroed:
https://github.com/Naville/snmalloc/blob/583cd5da55de58fe320a7054ce15d980071ed44c/src/snmalloc/override/jemalloc_compat.cc#L267-L302
Happy to add this overrides.