OLD | NEW |
1 // Copyright (c) 2005, 2007, Google Inc. | 1 // Copyright (c) 2005, 2007, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserv
ed. | 3 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserv
ed. |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 4148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4159 | 4159 |
4160 #undef malloc | 4160 #undef malloc |
4161 #undef free | 4161 #undef free |
4162 #undef realloc | 4162 #undef realloc |
4163 #undef calloc | 4163 #undef calloc |
4164 | 4164 |
4165 extern "C" { | 4165 extern "C" { |
4166 malloc_introspection_t jscore_fastmalloc_introspection = { &FastMallocZone::enum
erate, &FastMallocZone::goodSize, &FastMallocZone::check, &FastMallocZone::print
, | 4166 malloc_introspection_t jscore_fastmalloc_introspection = { &FastMallocZone::enum
erate, &FastMallocZone::goodSize, &FastMallocZone::check, &FastMallocZone::print
, |
4167 &FastMallocZone::log, &FastMallocZone::forceLock, &FastMallocZone::forceUnlo
ck, &FastMallocZone::statistics | 4167 &FastMallocZone::log, &FastMallocZone::forceLock, &FastMallocZone::forceUnlo
ck, &FastMallocZone::statistics |
4168 | 4168 |
4169 #if OS(IOS) || __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 | 4169 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 |
4170 , 0 // zone_locked will not be called on the zone unless it advertises itsel
f as version five or higher. | 4170 , 0 // zone_locked will not be called on the zone unless it advertises itsel
f as version five or higher. |
4171 #endif | 4171 #endif |
4172 #if OS(IOS) || __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 | 4172 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 |
4173 , 0, 0, 0, 0 // These members will not be used unless the zone advertises it
self as version seven or higher. | 4173 , 0, 0, 0, 0 // These members will not be used unless the zone advertises it
self as version seven or higher. |
4174 #endif | 4174 #endif |
4175 | 4175 |
4176 }; | 4176 }; |
4177 } | 4177 } |
4178 | 4178 |
4179 FastMallocZone::FastMallocZone(TCMalloc_PageHeap* pageHeap, TCMalloc_ThreadCache
** threadHeaps, TCMalloc_Central_FreeListPadded* centralCaches, PageHeapAllocato
r<Span>* spanAllocator, PageHeapAllocator<TCMalloc_ThreadCache>* pageHeapAllocat
or) | 4179 FastMallocZone::FastMallocZone(TCMalloc_PageHeap* pageHeap, TCMalloc_ThreadCache
** threadHeaps, TCMalloc_Central_FreeListPadded* centralCaches, PageHeapAllocato
r<Span>* spanAllocator, PageHeapAllocator<TCMalloc_ThreadCache>* pageHeapAllocat
or) |
4180 : m_pageHeap(pageHeap) | 4180 : m_pageHeap(pageHeap) |
4181 , m_threadHeaps(threadHeaps) | 4181 , m_threadHeaps(threadHeaps) |
4182 , m_centralCaches(centralCaches) | 4182 , m_centralCaches(centralCaches) |
(...skipping 18 matching lines...) Expand all Loading... |
4201 void FastMallocZone::init() | 4201 void FastMallocZone::init() |
4202 { | 4202 { |
4203 static FastMallocZone zone(pageheap, &thread_heaps, static_cast<TCMalloc_Cen
tral_FreeListPadded*>(central_cache), &span_allocator, &threadheap_allocator); | 4203 static FastMallocZone zone(pageheap, &thread_heaps, static_cast<TCMalloc_Cen
tral_FreeListPadded*>(central_cache), &span_allocator, &threadheap_allocator); |
4204 } | 4204 } |
4205 | 4205 |
4206 #endif // OS(DARWIN) | 4206 #endif // OS(DARWIN) |
4207 | 4207 |
4208 } // namespace WTF | 4208 } // namespace WTF |
4209 | 4209 |
4210 #endif // FORCE_SYSTEM_MALLOC | 4210 #endif // FORCE_SYSTEM_MALLOC |
OLD | NEW |