Changeset 46153 in webkit for trunk/JavaScriptCore/wtf/FastMalloc.cpp
- Timestamp:
- Jul 20, 2009, 9:02:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r45566 r46153 173 173 } 174 174 175 void*tryFastZeroedMalloc(size_t n)175 TryMallocReturnValue tryFastZeroedMalloc(size_t n) 176 176 { 177 void* result = tryFastMalloc(n);178 if (! result)177 void* result; 178 if (!tryFastMalloc(n).getValue(result)) 179 179 return 0; 180 180 memset(result, 0, n); … … 195 195 namespace WTF { 196 196 197 void*tryFastMalloc(size_t n)197 TryMallocReturnValue tryFastMalloc(size_t n) 198 198 { 199 199 ASSERT(!isForbidden()); … … 231 231 } 232 232 233 void*tryFastCalloc(size_t n_elements, size_t element_size)233 TryMallocReturnValue tryFastCalloc(size_t n_elements, size_t element_size) 234 234 { 235 235 ASSERT(!isForbidden()); … … 286 286 } 287 287 288 void*tryFastRealloc(void* p, size_t n)288 TryMallocReturnValue tryFastRealloc(void* p, size_t n) 289 289 { 290 290 ASSERT(!isForbidden()); … … 3388 3388 } 3389 3389 3390 void*tryFastMalloc(size_t size)3390 TryMallocReturnValue tryFastMalloc(size_t size) 3391 3391 { 3392 3392 return malloc<false>(size); … … 3449 3449 } 3450 3450 3451 void*tryFastCalloc(size_t n, size_t elem_size)3451 TryMallocReturnValue tryFastCalloc(size_t n, size_t elem_size) 3452 3452 { 3453 3453 return calloc<false>(n, elem_size); … … 3513 3513 } 3514 3514 3515 void*tryFastRealloc(void* old_ptr, size_t new_size)3515 TryMallocReturnValue tryFastRealloc(void* old_ptr, size_t new_size) 3516 3516 { 3517 3517 return realloc<false>(old_ptr, new_size);
Note:
See TracChangeset
for help on using the changeset viewer.