mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
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.
This commit is contained in:
parent
e31298bdc3
commit
2f1fc1df5c
3 changed files with 11 additions and 1 deletions
|
@ -61,7 +61,6 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
#define MI_ENCODE_FREELIST 1
|
||||
#endif
|
||||
|
||||
|
||||
// ------------------------------------------------------
|
||||
// Platform specific values
|
||||
// ------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue