Changeset 48976 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 1, 2009, 9:22:43 AM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r48954 r48976 1 2009-10-01 Zoltan Horvath <[email protected]> 2 3 Reviewed by Simon Hausmann. 4 5 [Qt] Allow custom memory allocation control for the whole JavaScriptCore 6 https://bugs.webkit.org/show_bug.cgi?id=27029 7 8 Since in JavaScriptCore almost every class which has been instantiated by operator new is 9 inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port 10 when USE_SYSTEM_MALLOC=0. 11 12 Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread(). 13 (It's needed for the functionality of TCmalloc.) 14 15 Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled. 16 17 * JavaScriptCore.pri: 18 * wtf/FastMalloc.cpp: 19 (WTF::sleep): 20 * wtf/FastMalloc.h: 21 1 22 2009-09-30 Gabor Loki <[email protected]> 2 23 -
trunk/JavaScriptCore/JavaScriptCore.pri
r48788 r48976 139 139 runtime/MarkStackPosix.cpp 140 140 } 141 } 142 143 !contains(DEFINES, USE_SYSTEM_MALLOC) { 144 SOURCES += wtf/TCSystemAlloc.cpp 141 145 } 142 146 -
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r48733 r48976 380 380 #include <stddef.h> 381 381 #include <stdio.h> 382 #if PLATFORM(UNIX) 383 #include <unistd.h> 384 #endif 382 385 #if COMPILER(MSVC) 383 386 #ifndef WIN32_LEAN_AND_MEAN … … 2275 2278 2276 2279 #if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY 2277 #if PLATFORM(WIN )2280 #if PLATFORM(WIN_OS) 2278 2281 static void sleep(unsigned seconds) 2279 2282 { -
trunk/JavaScriptCore/wtf/FastMalloc.h
r47093 r48976 214 214 // new by accident. 215 215 216 // We musn't customize the global operator new and delete for the Qt port. 217 #if !PLATFORM(QT) 218 216 219 WTF_PRIVATE_INLINE void* operator new(size_t size) { return fastMalloc(size); } 217 220 WTF_PRIVATE_INLINE void* operator new(size_t size, const std::nothrow_t&) throw() { return fastMalloc(size); } … … 225 228 #endif 226 229 230 #endif 231 227 232 #endif /* WTF_FastMalloc_h */
Note:
See TracChangeset
for help on using the changeset viewer.