Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Side by Side Diff: base/process/memory.h

Issue 23455061: Add sk_calloc and sk_calloc_throw to SkMemory_new_handler.cpp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: throwOnFailure -> throw_on_failure Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/process/memory_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | base/process/memory_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698