Skip to content

Commit

Permalink
Comment out private function malloc_logger for AppStore compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
phoboslab committed Nov 19, 2013
1 parent 099288a commit bcd029c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions WTF/wtf/FastMalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ class FastMallocZone {
};

// This method declaration, and the constants below, are taken from Libc/gen/malloc.c.
extern "C" void (*malloc_logger)(uint32_t typeFlags, uintptr_t zone, uintptr_t size, uintptr_t pointer, uintptr_t returnValue, uint32_t numberOfFramesToSkip);
//extern "C" void (*malloc_logger)(uint32_t typeFlags, uintptr_t zone, uintptr_t size, uintptr_t pointer, uintptr_t returnValue, uint32_t numberOfFramesToSkip);

#endif

Expand All @@ -1522,7 +1522,13 @@ class MallocHook {

static void record(uint32_t typeFlags, uintptr_t zone, uintptr_t size, void* pointer, void* returnValue, uint32_t numberOfFramesToSkip)
{
malloc_logger(typeFlags, zone, size, reinterpret_cast<uintptr_t>(pointer), reinterpret_cast<uintptr_t>(returnValue), numberOfFramesToSkip);
#pragma unused (typeFlags)
#pragma unused (zone)
#pragma unused (size)
#pragma unused (pointer)
#pragma unused (returnValue)
#pragma unused (numberOfFramesToSkip)
// malloc_logger(typeFlags, zone, size, reinterpret_cast<uintptr_t>(pointer), reinterpret_cast<uintptr_t>(returnValue), numberOfFramesToSkip);
}

static NEVER_INLINE void recordAllocation(void* pointer, size_t size)
Expand All @@ -1545,7 +1551,7 @@ class MallocHook {
{
#if OS(DARWIN)
// If the system allocator's malloc_logger has been set up then stack logging is enabled.
stackLoggingEnabled = malloc_logger;
// stackLoggingEnabled = malloc_logger;
#endif
}

Expand Down

0 comments on commit bcd029c

Please sign in to comment.