Changeset 74802 in webkit for trunk/JavaScriptCore/wtf/FastMalloc.cpp
- Timestamp:
- Dec 30, 2010, 11:34:03 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r68899 r74802 212 212 #if OS(DARWIN) 213 213 #include <malloc/malloc.h> 214 #elif COMPILER(MSVC)214 #elif OS(WINDOWS) 215 215 #include <malloc.h> 216 216 #endif … … 385 385 #if OS(DARWIN) 386 386 return malloc_size(p); 387 #elif COMPILER(MSVC) && !PLATFORM(BREWMP)387 #elif OS(WINDOWS) && !PLATFORM(BREWMP) 388 388 // Brew MP uses its own memory allocator, so _msize does not work on the Brew MP simulator. 389 389 return _msize(const_cast<void*>(p)); … … 2152 2152 private: 2153 2153 typedef TCMalloc_ThreadCache_FreeList FreeList; 2154 #if COMPILER(MSVC)2154 #if OS(WINDOWS) 2155 2155 typedef DWORD ThreadIdentifier; 2156 2156 #else … … 2443 2443 static bool tsd_inited = false; 2444 2444 static pthread_key_t heap_key; 2445 #if COMPILER(MSVC)2445 #if OS(WINDOWS) 2446 2446 DWORD tlsIndex = TLS_OUT_OF_INDEXES; 2447 2447 #endif … … 2452 2452 // benefit from the delete callback. 2453 2453 pthread_setspecific(heap_key, heap); 2454 #if COMPILER(MSVC)2454 #if OS(WINDOWS) 2455 2455 TlsSetValue(tlsIndex, heap); 2456 2456 #endif … … 2963 2963 if (KernelSupportsTLS()) 2964 2964 return threadlocal_heap; 2965 #elif COMPILER(MSVC)2965 #elif OS(WINDOWS) 2966 2966 return static_cast<TCMalloc_ThreadCache*>(TlsGetValue(tlsIndex)); 2967 2967 #else … … 2993 2993 ASSERT(!tsd_inited); 2994 2994 pthread_key_create(&heap_key, DestroyThreadCache); 2995 #if COMPILER(MSVC)2995 #if OS(WINDOWS) 2996 2996 tlsIndex = TlsAlloc(); 2997 2997 #endif 2998 2998 tsd_inited = true; 2999 2999 3000 #if ! COMPILER(MSVC)3000 #if !OS(WINDOWS) 3001 3001 // We may have used a fake pthread_t for the main thread. Fix it. 3002 3002 pthread_t zero; … … 3009 3009 #endif 3010 3010 for (TCMalloc_ThreadCache* h = thread_heaps; h != NULL; h = h->next_) { 3011 #if COMPILER(MSVC)3011 #if OS(WINDOWS) 3012 3012 if (h->tid_ == 0) { 3013 3013 h->tid_ = GetCurrentThreadId(); … … 3027 3027 SpinLockHolder h(&pageheap_lock); 3028 3028 3029 #if COMPILER(MSVC)3029 #if OS(WINDOWS) 3030 3030 DWORD me; 3031 3031 if (!tsd_inited) { … … 3048 3048 // and added to the linked list. So we search for that first. 3049 3049 for (TCMalloc_ThreadCache* h = thread_heaps; h != NULL; h = h->next_) { 3050 #if COMPILER(MSVC)3050 #if OS(WINDOWS) 3051 3051 if (h->tid_ == me) { 3052 3052 #else
Note:
See TracChangeset
for help on using the changeset viewer.