OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_PROCESS_MEMORY_H_ | 5 #ifndef BASE_PROCESS_MEMORY_H_ |
6 #define BASE_PROCESS_MEMORY_H_ | 6 #define BASE_PROCESS_MEMORY_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 #if defined(OS_MACOSX) | 56 #if defined(OS_MACOSX) |
57 // Very large images or svg canvases can cause huge mallocs. Skia | 57 // Very large images or svg canvases can cause huge mallocs. Skia |
58 // does tricks on tcmalloc-based systems to allow malloc to fail with | 58 // does tricks on tcmalloc-based systems to allow malloc to fail with |
59 // a NULL rather than hit the oom crasher. This replicates that for | 59 // a NULL rather than hit the oom crasher. This replicates that for |
60 // OSX. | 60 // OSX. |
61 // | 61 // |
62 // IF YOU USE THIS WITHOUT CONSULTING YOUR FRIENDLY OSX DEVELOPER, | 62 // IF YOU USE THIS WITHOUT CONSULTING YOUR FRIENDLY OSX DEVELOPER, |
63 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. | 63 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. |
64 BASE_EXPORT void* UncheckedMalloc(size_t size); | 64 BASE_EXPORT void* UncheckedMalloc(size_t size); |
| 65 BASE_EXPORT void* UncheckedCalloc(size_t num_items, size_t size); |
65 #endif // defined(OS_MACOSX) | 66 #endif // defined(OS_MACOSX) |
66 | 67 |
67 } // namespace base | 68 } // namespace base |
68 | 69 |
69 #endif // BASE_PROCESS_MEMORY_H_ | 70 #endif // BASE_PROCESS_MEMORY_H_ |
OLD | NEW |