Commit Graph

270 Commits

Author SHA1 Message Date
Daniel Micay
e85c69a0a4 fix builds with prefix 2018-08-29 15:07:36 -04:00
Daniel Micay
becadc57a5 get rid of unused MIN_ALIGN definition 2018-08-29 14:18:45 -04:00
Daniel Micay
2684a98eab add initial malloc_object_size extensions 2018-08-29 14:18:42 -04:00
Daniel Micay
00b2613e16 add mmap MAP_FIXED wrapper for dropping slabs 2018-08-29 13:04:52 -04:00
Daniel Micay
0e2f3d1015 sanity check page size at runtime 2018-08-29 11:00:18 -04:00
Daniel Micay
d779d41721 wrap more memory mapping implementation details 2018-08-29 10:57:42 -04:00
Daniel Micay
1cb28531a8 add wrapper for mremap with sanity check 2018-08-29 10:43:54 -04:00
Daniel Micay
5bc6820c24 rely on mmap rounding to page size when possible 2018-08-29 03:25:00 -04:00
Daniel Micay
58d929c0f0 split out low-level memory mapping wrappers 2018-08-29 00:53:38 -04:00
Daniel Micay
8b42e8c3d6 make sure errno is always set on failure 2018-08-28 22:49:11 -04:00
Daniel Micay
66aa98dbd9 sanity-check mmap errno on failure too 2018-08-28 22:41:18 -04:00
Daniel Micay
705b6a4f8d make non-out-of-memory mprotect errors fatal 2018-08-28 22:22:57 -04:00
Daniel Micay
19c46d16f1 check pthread_atfork return value 2018-08-28 21:31:20 -04:00
Daniel Micay
0e2bc8a1cf make sure RELRO is enabled on every toolchain 2018-08-28 11:44:23 -04:00
Daniel Micay
e72674e358 detect missing symbols when linking 2018-08-28 11:13:17 -04:00
Daniel Micay
803811a6ac add support for using mremap 2018-08-28 10:44:04 -04:00
Daniel Micay
718bf82f96 add inline hints for slab_allocate and slab_free 2018-08-27 09:29:30 -04:00
Daniel Micay
33f862ec19 add inline hints for init and enforce_init 2018-08-27 09:29:27 -04:00
Daniel Micay
67b9608ccf avoid duplicated init code calculating slab size 2018-08-27 09:22:04 -04:00
Daniel Micay
eec85b0c8c add chosen libdivide license (Boost) to CREDITS 2018-08-27 07:52:49 -04:00
Daniel Micay
c7b24f63f1 use libdivide for substantially faster division 2018-08-27 07:07:48 -04:00
Daniel Micay
63b0c39343 reorder size_class struct for better performance 2018-08-27 05:21:58 -04:00
Daniel Micay
b424c95737 clarify memory is zero on init without more writes 2018-08-27 01:14:36 -04:00
Daniel Micay
02db36c4bb update CREDITS with ChaCha8 implementation 2018-08-26 07:27:19 -04:00
Daniel Micay
1b3d485e87 clarify that the slab design isn't like jemalloc 2018-08-26 07:19:58 -04:00
Daniel Micay
c97bbc141c add missing word 2018-08-26 07:11:22 -04:00
Daniel Micay
f793a2719f add some basic initial documentation to the README 2018-08-26 06:39:33 -04:00
Daniel Micay
c60fbfb029 output markdown table from calculate_waste 2018-08-26 06:21:09 -04:00
Daniel Micay
497f71ac65 reorder offset test output 2018-08-26 04:51:47 -04:00
Daniel Micay
14ca7d7c3f randomize large allocation guard size 2018-08-26 04:46:12 -04:00
Daniel Micay
a13a45a17d hold regions_lock in alloc_aligned 2018-08-26 04:37:43 -04:00
Daniel Micay
bec20a39cf add offset test 2018-08-26 03:19:59 -04:00
Daniel Micay
700e06c2db manually specialize the CSPRNG cache 2018-08-26 00:43:46 -04:00
Daniel Micay
c41e659383 use ChaCha8-based CSPRNG 2018-08-25 23:24:00 -04:00
Daniel Micay
2b7c9362bb consume fewer random bytes for slab randomization 2018-08-25 18:32:44 -04:00
Daniel Micay
c5d76179a5 improve interaction of slot rand with slot mask 2018-08-25 18:04:55 -04:00
Daniel Micay
173dd6e7a5 randomize slot selection for empty slabs too 2018-08-25 18:02:13 -04:00
Daniel Micay
c335c43dd7 simplify slab out-of-memory error handling 2018-08-25 16:41:07 -04:00
Daniel Micay
7bcfa3f08b tune slab metadata allocation 2018-08-25 15:46:22 -04:00
Daniel Micay
4777ee0c85 special case division for page size slabs 2018-08-25 15:21:50 -04:00
Daniel Micay
ec78add6ab define ffzl utility function 2018-08-25 03:14:07 -04:00
Daniel Micay
f08d4d31db randomize slab slot choice 2018-08-25 03:02:39 -04:00
Daniel Micay
965c3202b4 finish implementation of zero byte size class 2018-08-25 02:48:47 -04:00
Daniel Micay
f97a0ef8b1 use a more appropriate type for masked bitmaps 2018-08-25 01:09:15 -04:00
Daniel Micay
f3c8502509 add CSPRNGs for regions and slabs 2018-08-25 00:25:33 -04:00
Daniel Micay
510291646b document minimum versions for dependencies 2018-08-24 19:30:36 -04:00
Daniel Micay
71dde7c4f8 provide getrandom wrapper to support glibc < 2.25
Debian stretch (currently stable) only has glibc 2.24...
2018-08-24 18:48:55 -04:00
Daniel Micay
35c9e6f16d add delayed double free tests 2018-08-24 05:53:17 -04:00
Daniel Micay
aaa4eeca4d add a clean target for the memory corruption tests 2018-08-24 05:25:52 -04:00
Daniel Micay
805bdc6087 add an extra sanity check for unallocated metadata 2018-08-24 05:22:38 -04:00