Commit cc7d55ce authored by lars's avatar lars
Browse files

Disable FastMalloc for the Qt build and make sure we

        don't reimplement the global new/delete operators
        when using the system malloc.	



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a5dc917c
2007-06-14 Lars Knoll <lars@trolltech.com>
Reviewed by Maciej.
Disable FastMalloc for the Qt build and make sure we
don't reimplement the global new/delete operators
when using the system malloc.
* wtf/FastMalloc.cpp:
* wtf/FastMalloc.h:
* wtf/Platform.h:
2007-06-13 Anders Carlsson <andersca@apple.com> 2007-06-13 Anders Carlsson <andersca@apple.com>
   
Reviewed by Geoff. Reviewed by Geoff.
......
...@@ -70,12 +70,10 @@ ...@@ -70,12 +70,10 @@
#include <pthread.h> #include <pthread.h>
#endif #endif
#ifndef USE_SYSTEM_MALLOC #if !defined(USE_SYSTEM_MALLOC) && defined(NDEBUG)
#ifndef NDEBUG #define FORCE_SYSTEM_MALLOC 0
#define USE_SYSTEM_MALLOC 1
#else #else
#define USE_SYSTEM_MALLOC 0 #define FORCE_SYSTEM_MALLOC 1
#endif
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG
...@@ -129,7 +127,7 @@ void fastMallocAllow() ...@@ -129,7 +127,7 @@ void fastMallocAllow()
} // namespace WTF } // namespace WTF
#endif // NDEBUG #endif // NDEBUG
#if USE_SYSTEM_MALLOC #if FORCE_SYSTEM_MALLOC
#include <stdlib.h> #include <stdlib.h>
#if !PLATFORM(WIN_OS) #if !PLATFORM(WIN_OS)
......
...@@ -61,10 +61,12 @@ using WTF::fastMallocAllow; ...@@ -61,10 +61,12 @@ using WTF::fastMallocAllow;
#ifndef _CRTDBG_MAP_ALLOC #ifndef _CRTDBG_MAP_ALLOC
#if !(USE_SYSTEM_MALLOC)
WTF_PRIVATE_INLINE void* operator new(size_t s) { return fastMalloc(s); } WTF_PRIVATE_INLINE void* operator new(size_t s) { return fastMalloc(s); }
WTF_PRIVATE_INLINE void operator delete(void* p) { fastFree(p); } WTF_PRIVATE_INLINE void operator delete(void* p) { fastFree(p); }
WTF_PRIVATE_INLINE void* operator new[](size_t s) { return fastMalloc(s); } WTF_PRIVATE_INLINE void* operator new[](size_t s) { return fastMalloc(s); }
WTF_PRIVATE_INLINE void operator delete[](void* p) { fastFree(p); } WTF_PRIVATE_INLINE void operator delete[](void* p) { fastFree(p); }
#endif
#endif // _CRTDBG_MAP_ALLOC #endif // _CRTDBG_MAP_ALLOC
......
...@@ -197,4 +197,8 @@ ...@@ -197,4 +197,8 @@
#define WTF_USE_CURL 1 #define WTF_USE_CURL 1
#endif #endif
#if PLATFORM(QT)
#define USE_SYSTEM_MALLOC 1
#endif
#endif /* WTF_Platform_h */ #endif /* WTF_Platform_h */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment