| Index: base/allocator/allocator_shim_override_ucrt_symbols_win.h
|
| diff --git a/base/allocator/allocator_shim_override_ucrt_symbols_win.h b/base/allocator/allocator_shim_override_ucrt_symbols_win.h
|
| index 2aa872f1b3fbb1c5d4d7d120f96b5383f2d8b54d..b8d0d91ff57d6f4a5bac5bcf912c839ab12d580b 100644
|
| --- a/base/allocator/allocator_shim_override_ucrt_symbols_win.h
|
| +++ b/base/allocator/allocator_shim_override_ucrt_symbols_win.h
|
| @@ -63,6 +63,30 @@ __declspec(restrict) void* calloc(size_t n, size_t size) {
|
| return ShimCalloc(n, size);
|
| }
|
|
|
| +// The symbols
|
| +// * __acrt_heap
|
| +// * __acrt_initialize_heap
|
| +// * __acrt_uninitialize_heap
|
| +// * _get_heap_handle
|
| +// must be overridden all or none, as they are otherwise supplied
|
| +// by heap_handle.obj in the ucrt.lib file.
|
| +HANDLE __acrt_heap = nullptr;
|
| +
|
| +bool __acrt_initialize_heap() {
|
| + __acrt_heap = ::HeapCreate(0, 0, 0);
|
| + return true;
|
| +}
|
| +
|
| +bool __acrt_uninitialize_heap() {
|
| + ::HeapDestroy(__acrt_heap);
|
| + __acrt_heap = nullptr;
|
| + return true;
|
| +}
|
| +
|
| +intptr_t _get_heap_handle(void) {
|
| + return reinterpret_cast<intptr_t>(__acrt_heap);
|
| +}
|
| +
|
| // The default dispatch translation unit has to define also the following
|
| // symbols (unless they are ultimately routed to the system symbols):
|
| // void malloc_stats(void);
|
|
|