-
Type: Improvement
-
Resolution: Gone away
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Service Arch
-
Execution Team 2022-12-12, Execution Team 2022-12-26, Execution Team 2023-01-09
The allocators we use don't have advantageous realloc behavior, and using malloc/free in C++ code prevents us from letting the "new handler" abort on allocation failures. That, in turn, leads us to a highly suspect set of macros in allocator.h, that may cause ODR violations or other surprising behaviors.
The solution is to replace uses of malloc with new, free with delete and realloc with new, memcpy and delete, if they can't be eliminated outright.
- is duplicated by
-
SERVER-12752 Eliminate direct uses of C allocation routines malloc, free, and realloc in the server
- Closed
- related to
-
SERVER-14889 report out of memory error when malloc() or realloc() fails
- Closed