Changeset 48976 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 1, 2009, 9:22:43 AM (16 years ago)
Author:
[email protected]
Message:

2009-10-01 Zoltan Horvath <[email protected]>

Reviewed by Simon Hausmann.

[Qt] Allow custom memory allocation control for the whole JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=27029

Since in JavaScriptCore almost every class which has been instantiated by operator new is
inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
when USE_SYSTEM_MALLOC=0.

Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
(It's needed for the functionality of TCmalloc.)

Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.

  • JavaScriptCore.pri:
  • wtf/FastMalloc.cpp: (WTF::sleep):
  • wtf/FastMalloc.h:

2009-10-01 Zoltan Horvath <[email protected]>

Reviewed by Simon Hausmann.

[Qt] Don't use TCmalloc in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=27029

Add USE_SYSTEM_MALLOC macro to the DRT's profile to avoid using TCmalloc in Qt's DRT.

  • DumpRenderTree/qt/DumpRenderTree.pro:

2009-10-01 Zoltan Horvath <[email protected]>

Reviewed by Simon Hausmann.

[Qt] Enable TCmalloc for the Linux, Mac and Windows Qt-port
https://bugs.webkit.org/show_bug.cgi?id=27029

Remove USE_SYSTEM_MALLOC for Linux, Mac and Windows Qt-port from WebKit.pri,
so these Qt-ports will use TCmalloc as other ports.

  • WebKit.pri:
Location:
trunk/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r48954 r48976  
     12009-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
    1222009-09-30  Gabor Loki  <[email protected]>
    223
  • trunk/JavaScriptCore/JavaScriptCore.pri

    r48788 r48976  
    139139                  runtime/MarkStackPosix.cpp
    140140    }
     141}
     142
     143!contains(DEFINES, USE_SYSTEM_MALLOC) {
     144    SOURCES += wtf/TCSystemAlloc.cpp
    141145}
    142146
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r48733 r48976  
    380380#include <stddef.h>
    381381#include <stdio.h>
     382#if PLATFORM(UNIX)
     383#include <unistd.h>
     384#endif
    382385#if COMPILER(MSVC)
    383386#ifndef WIN32_LEAN_AND_MEAN
     
    22752278
    22762279#if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
    2277 #if PLATFORM(WIN)
     2280#if PLATFORM(WIN_OS)
    22782281static void sleep(unsigned seconds)
    22792282{
  • trunk/JavaScriptCore/wtf/FastMalloc.h

    r47093 r48976  
    214214// new by accident.
    215215
     216// We musn't customize the global operator new and delete for the Qt port.
     217#if !PLATFORM(QT)
     218
    216219WTF_PRIVATE_INLINE void* operator new(size_t size) { return fastMalloc(size); }
    217220WTF_PRIVATE_INLINE void* operator new(size_t size, const std::nothrow_t&) throw() { return fastMalloc(size); }
     
    225228#endif
    226229
     230#endif
     231
    227232#endif /* WTF_FastMalloc_h */
Note: See TracChangeset for help on using the changeset viewer.