Rework free list so that 0 is the placeholder.
This is needed because in some configurations the constructor for the global placeholder is not called before the first allocation (i.e. when other globals call the allocator in their constructor) and so we ended up following a null pointer.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
# include <emmintrin.h>
|
||||
# define ALWAYSINLINE __attribute__((always_inline))
|
||||
# define NOINLINE __attribute__((noinline))
|
||||
# define SNMALLOC_SLOW_PATH NOINLINE
|
||||
# define SNMALLOC_SLOW_PATH NOINLINE __attribute__((section(".text,slow")))
|
||||
# define SNMALLOC_FAST_PATH inline ALWAYSINLINE
|
||||
# define SNMALLOC_PURE __attribute__((const))
|
||||
# ifdef __clang__
|
||||
|
||||
Reference in New Issue
Block a user