Changeset 46180 in webkit for trunk/JavaScriptCore/wtf/FastMalloc.cpp
- Timestamp:
- Jul 21, 2009, 11:13:11 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r46153 r46180 173 173 } 174 174 175 TryMallocReturnValuetryFastZeroedMalloc(size_t n)175 void* tryFastZeroedMalloc(size_t n) 176 176 { 177 void* result ;178 if (! tryFastMalloc(n).getValue(result))177 void* result = tryFastMalloc(n); 178 if (!result) 179 179 return 0; 180 180 memset(result, 0, n); … … 195 195 namespace WTF { 196 196 197 TryMallocReturnValuetryFastMalloc(size_t n)197 void* tryFastMalloc(size_t n) 198 198 { 199 199 ASSERT(!isForbidden()); … … 231 231 } 232 232 233 TryMallocReturnValuetryFastCalloc(size_t n_elements, size_t element_size)233 void* tryFastCalloc(size_t n_elements, size_t element_size) 234 234 { 235 235 ASSERT(!isForbidden()); … … 286 286 } 287 287 288 TryMallocReturnValuetryFastRealloc(void* p, size_t n)288 void* tryFastRealloc(void* p, size_t n) 289 289 { 290 290 ASSERT(!isForbidden()); … … 3388 3388 } 3389 3389 3390 TryMallocReturnValuetryFastMalloc(size_t size)3390 void* tryFastMalloc(size_t size) 3391 3391 { 3392 3392 return malloc<false>(size); … … 3449 3449 } 3450 3450 3451 TryMallocReturnValuetryFastCalloc(size_t n, size_t elem_size)3451 void* tryFastCalloc(size_t n, size_t elem_size) 3452 3452 { 3453 3453 return calloc<false>(n, elem_size); … … 3513 3513 } 3514 3514 3515 TryMallocReturnValuetryFastRealloc(void* old_ptr, size_t new_size)3515 void* 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.