Changeset 47092 in webkit for trunk/JavaScriptCore/wtf/FastMalloc.cpp
- Timestamp:
- Aug 11, 2009, 11:22:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r46999 r47092 179 179 } 180 180 181 void*tryFastZeroedMalloc(size_t n)182 { 183 void* result = tryFastMalloc(n);184 if (! result)181 TryMallocReturnValue tryFastZeroedMalloc(size_t n) 182 { 183 void* result; 184 if (!tryFastMalloc(n).getValue(result)) 185 185 return 0; 186 186 memset(result, 0, n); … … 201 201 namespace WTF { 202 202 203 void*tryFastMalloc(size_t n)203 TryMallocReturnValue tryFastMalloc(size_t n) 204 204 { 205 205 ASSERT(!isForbidden()); … … 237 237 } 238 238 239 void*tryFastCalloc(size_t n_elements, size_t element_size)239 TryMallocReturnValue tryFastCalloc(size_t n_elements, size_t element_size) 240 240 { 241 241 ASSERT(!isForbidden()); … … 292 292 } 293 293 294 void*tryFastRealloc(void* p, size_t n)294 TryMallocReturnValue tryFastRealloc(void* p, size_t n) 295 295 { 296 296 ASSERT(!isForbidden()); … … 3577 3577 } 3578 3578 3579 void*tryFastMalloc(size_t size)3579 TryMallocReturnValue tryFastMalloc(size_t size) 3580 3580 { 3581 3581 return malloc<false>(size); … … 3638 3638 } 3639 3639 3640 void*tryFastCalloc(size_t n, size_t elem_size)3640 TryMallocReturnValue tryFastCalloc(size_t n, size_t elem_size) 3641 3641 { 3642 3642 return calloc<false>(n, elem_size); … … 3702 3702 } 3703 3703 3704 void*tryFastRealloc(void* old_ptr, size_t new_size)3704 TryMallocReturnValue tryFastRealloc(void* old_ptr, size_t new_size) 3705 3705 { 3706 3706 return realloc<false>(old_ptr, new_size);
Note:
See TracChangeset
for help on using the changeset viewer.