Changeset 50204 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 28, 2009, 3:14:35 AM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r50201 r50204 1 2009-10-26 Holger Hans Peter Freyther <[email protected]> 2 3 Rubber-stamped by Darin Adler. 4 5 Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix 6 https://bugs.webkit.org/show_bug.cgi?id=30769 7 8 When using -fvisibility=hidden to hide all internal symbols by default 9 the malloc symbols will be hidden as well. For memory instrumentation 10 it is needed to provide an instrumented version of these symbols and 11 override the normal routines and by changing the visibility back to 12 default this becomes possible. 13 14 The only other solution would be to use system malloc instead of the 15 TCmalloc implementation but this will not allow to analyze memory 16 behavior with the default allocator. 17 18 * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin 19 1 20 2009-10-27 Gavin Barraclough <[email protected]> 2 21 -
trunk/JavaScriptCore/wtf/FastMalloc.h
r48976 r50204 27 27 #include <new> 28 28 29 #if COMPILER(GCC) 30 #define WTF_FAST_MALLOC_EXPORT __attribute__((visibility("default"))) 31 #else 32 #define WTF_FAST_MALLOC_EXPORT 33 #endif 34 29 35 namespace WTF { 30 36 31 37 // These functions call CRASH() if an allocation fails. 32 void* fastMalloc(size_t) ;38 void* fastMalloc(size_t) WTF_FAST_MALLOC_EXPORT; 33 39 void* fastZeroedMalloc(size_t); 34 void* fastCalloc(size_t numElements, size_t elementSize) ;35 void* fastRealloc(void*, size_t) ;40 void* fastCalloc(size_t numElements, size_t elementSize) WTF_FAST_MALLOC_EXPORT; 41 void* fastRealloc(void*, size_t) WTF_FAST_MALLOC_EXPORT; 36 42 37 43 struct TryMallocReturnValue { … … 72 78 TryMallocReturnValue tryFastRealloc(void* p, size_t n); 73 79 74 void fastFree(void*) ;80 void fastFree(void*) WTF_FAST_MALLOC_EXPORT; 75 81 76 82 #ifndef NDEBUG
Note:
See TracChangeset
for help on using the changeset viewer.