Anton Korobeynikov
2f1fc1df5c
Add xmalloc()-like functionality.
...
xmalloc is a non-standard extension forcing malloc() to
abort should the memory allocation failed instead of returning a
null pointer. Such functionality is quite useful as it provides one
single point of error handling if the caller of malloc() does not
check the result (as it often does!) and segfault is ocurring somewhere
else. If more fine-grained control is necessary one could register a custom
error handler, however, this might not be an option while interposing.
2020-04-28 16:38:47 +03:00
daan
07fbe4f80f
fixes for dragonfly
2020-02-02 14:31:28 -08:00
daan
bb64634e4e
Merge branch 'dev-exp' into dev-exp-tls
2020-02-01 17:48:57 -08:00
daan
3f17ac287c
add 'nodiscard' attribute to mimalloc interface
2020-02-01 17:29:30 -08:00
daan
a169cf0e3f
merge dev-exp; add pthread TLS support for macOSX
2020-02-01 14:10:10 -08:00
daan
724602b78b
enable page-reset by default
2020-01-31 17:27:45 -08:00
daan
4531367de2
fix padding check for aligned allocation; improve perf for small aligned allocations
2020-01-31 13:20:02 -08:00
daan
03b363a1c2
first working tls on macOS using interpose; still slow
2020-01-29 22:46:44 -08:00
daan
7ff3ec2bf7
use EFAULT for buffer overflow and call abort in debug mode (as well as secure mode)
2020-01-29 17:25:40 -08:00
daan
e070eba112
fix tagged null encoding, search segment cache before reclaim
2020-01-24 16:31:18 -08:00
daan
58fdcbb0cd
fix bug in collect where has_page was not set on free pages
2020-01-23 21:37:14 -08:00
daan
e3b16fe4ef
reduce type casts in atomic operations
2020-01-22 19:44:54 -08:00
daan
dc58388968
Add ability to register custom error function called on various error conditions; including ENOMEM
2020-01-17 19:59:55 -08:00
daan
8d8f355ed0
add option to reset eagerly when a segment is abandoned
2020-01-16 11:25:02 -08:00
daan
9629d73188
fix options
2020-01-15 18:07:29 -08:00
daan
7a1e86fc20
merge from dev
2020-01-15 18:03:37 -08:00
daan
c9b5ac80b3
update page reset queue to just do delayed page resets
2020-01-15 12:00:44 -08:00
daan
783e3377f7
add output argument to stat printing
2020-01-15 10:53:54 -08:00
daan
f92a2a7264
add argument pointer to the register output routine
2020-01-15 10:18:32 -08:00
daan
941c55ee42
wip: first implementation of page free list on segments for effecient delayed page reset
2020-01-14 21:47:18 -08:00
daan
36d168a2d9
add preload check to options initialization
2019-12-01 00:03:35 -08:00
daan
1d998af854
clean up options; make secure work with eager_page_commit
2019-11-25 10:47:17 -08:00
daan
c6df7a199c
experimental eager page commit option
2019-11-24 22:02:40 -08:00
daan
4a0d35afd0
improve secure guard page allocation to work with non-eager commit
2019-11-23 11:59:19 -08:00
Daan Leijen
211f1aa519
remove reset delay slots; add reset tracking per page and segment
2019-11-20 14:55:12 -08:00
Daan Leijen
30e2c54adb
remove delayed reset option (for now)
2019-11-20 14:13:02 -08:00
Daan Leijen
d01ed42bcb
replace max_numa_nodes by use_numa_nodes (to help with wrong detection of numa nodes on WSL for example)
2019-11-13 13:35:50 -08:00
Daan Leijen
bdb8274819
change max_numa_node to max_numa_nodes option
2019-11-12 12:04:43 -08:00
daan
165ee45845
initialize delay slots for the main thread
2019-11-11 17:31:48 -08:00
daan
a0958b2da6
enable more reset delay slots
2019-11-11 17:06:16 -08:00
daan
741a80256d
merge from dev-exp
2019-11-11 14:51:16 -08:00
daan
2bb058bd25
remove cache_reset parameter
2019-11-11 14:44:32 -08:00
daan
534e1e39ef
allow allocation in committed regions even if not requested
2019-11-11 14:42:29 -08:00
daan
93a6463383
only allow commit delay for small and medium objects
2019-11-11 14:16:45 -08:00
daan
83a066fd2d
remove reset_decommits option
2019-11-11 09:46:02 -08:00
daan
829fd872f4
initial delay slots
2019-11-04 11:48:41 -08:00
daan
d1d65fbca4
make max error messages configurable
2019-11-03 13:25:41 -08:00
daan
f36ec5d9d8
reserve huge pages incrementally
2019-11-03 13:16:07 -08:00
daan
723fbba259
fix output during preloading enabling stderr only after the crt has loaded
2019-11-03 12:18:20 -08:00
daan
a6499be074
initial numa support for arenas
2019-11-01 19:53:07 -07:00
daan
6cf16b1201
fix reset error on windows when disabling eager commit option
2019-10-30 14:32:28 -07:00
daan
b052d3b731
enable double free and heap corruption detection in debug mode
2019-10-28 15:54:33 -07:00
daan
2affdbbd2e
stronger secure mode when defining MI_SECURE=4: checks for double free, corrupted free list, and invalid pointer frees. Performance is impacted but not too much -- more perf testing is needed
2019-10-18 18:11:04 -07:00
daan
fdfa6ed260
fix warnings at high warning level in msvc
2019-10-17 16:56:57 -07:00
daan
454bc67338
increase delayed output buffer to 32k
2019-10-17 12:14:15 -07:00
daan
480f7683a9
cleanup delayed output
2019-10-12 10:42:04 -07:00
Daan Leijen
5e9b37dc4e
add delayed output buffer
2019-10-12 10:21:42 -07:00
daan
60efb62155
make secure a build option only
2019-09-17 17:31:42 -07:00
daan
f2f7c8d0e9
fix volatile declaration on function pointer
2019-09-07 09:18:29 -07:00
daan
47fc73d694
fix c++ compilation; make default output non-atomic
2019-09-06 11:51:22 -07:00