OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
Primiano Tucci (use gerrit)
2016/07/13 17:42:49
nit: drop your wayback machine :P (also the new co
Sigurður Ásgeirsson
2016/07/13 18:47:45
Copy-paste FTW.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Thin allocation wrappers for the windows heap. This file should be deleted | |
6 // once the win-specific allocation shim has been removed, and the generic shim | |
7 // has becaome the default. | |
8 | |
9 #ifndef BASE_ALLOCATOR_ALLOCATOR_WINHEAP_STUBS_H_ | |
Primiano Tucci (use gerrit)
2016/07/13 17:42:49
nit: s/ALLOCATOR_ALLOCATOR_/ALLOCATOR_/
Sigurður Ásgeirsson
2016/07/13 18:47:45
and again :/
| |
10 #define BASE_ALLOCATOR_ALLOCATOR_WINHEAP_STUBS_H_ | |
11 | |
12 #include <windows.h> | |
Primiano Tucci (use gerrit)
2016/07/13 17:42:49
not sure you need this windows.h here. Looks like
Sigurður Ásgeirsson
2016/07/13 18:47:45
Done.
| |
13 | |
14 namespace base { | |
15 namespace allocator { | |
16 | |
17 // Set to true if the link-time magic has successfully hooked into the CRT's | |
18 // heap initialization. | |
19 extern bool g_is_win_shim_layer_initialized; | |
20 | |
21 // Thin wrappers to implement the standard C allocation semantics on the | |
22 // CRT's Windows heap. | |
23 void* WinHeapMalloc(size_t size); | |
24 void WinHeapFree(void* size); | |
25 void* WinHeapRealloc(void* ptr, size_t size); | |
26 void* WinHeapCalloc(size_t n, size_t elem_size); | |
27 | |
28 // Call the new handler, if one has been set. | |
29 // Returns true on successfully calling the handler, false otherwise. | |
30 bool WinCallNewHandler(size_t size); | |
31 | |
32 } // namespace allocator | |
33 } // namespace base | |
34 | |
35 #endif // BASE_ALLOCATOR_ALLOCATOR_WINHEAP_STUBS_H_ | |
OLD | NEW |