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

Side by Side Diff: src/ports/SkMemory_mozalloc.cpp

Issue 1449093002: use malloc/calloc/free instead of moz_malloc/moz_calloc/moz_free in ports/SkMemory_mozalloc.cpp (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: use malloc/calloc/free instead of moz_malloc/moz_calloc/moz_free in ports/SkMemory_mozalloc.cpp Created 5 years 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * Copyright 2012 Mozilla Foundation 3 * Copyright 2012 Mozilla Foundation
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkTypes.h" 9 #include "SkTypes.h"
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 void* sk_malloc_throw(size_t size) { 25 void* sk_malloc_throw(size_t size) {
26 return sk_malloc_flags(size, SK_MALLOC_THROW); 26 return sk_malloc_flags(size, SK_MALLOC_THROW);
27 } 27 }
28 28
29 void* sk_realloc_throw(void* addr, size_t size) { 29 void* sk_realloc_throw(void* addr, size_t size) {
30 return moz_xrealloc(addr, size); 30 return moz_xrealloc(addr, size);
31 } 31 }
32 32
33 void sk_free(void* p) { 33 void sk_free(void* p) {
34 moz_free(p); 34 free(p);
35 } 35 }
36 36
37 void* sk_malloc_flags(size_t size, unsigned flags) { 37 void* sk_malloc_flags(size_t size, unsigned flags) {
38 return (flags & SK_MALLOC_THROW) ? moz_xmalloc(size) : moz_malloc(size); 38 return (flags & SK_MALLOC_THROW) ? moz_xmalloc(size) : malloc(size);
39 } 39 }
40 40
41 void* sk_calloc(size_t size) { 41 void* sk_calloc(size_t size) {
42 return moz_calloc(size, 1); 42 return calloc(size, 1);
43 } 43 }
44 44
45 void* sk_calloc_throw(size_t size) { 45 void* sk_calloc_throw(size_t size) {
46 return moz_xcalloc(size, 1); 46 return moz_xcalloc(size, 1);
47 } 47 }
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698