diff options
Diffstat (limited to 'Source/WebKit2/Shared/mac/WebMemorySampler.mac.mm')
-rw-r--r-- | Source/WebKit2/Shared/mac/WebMemorySampler.mac.mm | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/WebKit2/Shared/mac/WebMemorySampler.mac.mm b/Source/WebKit2/Shared/mac/WebMemorySampler.mac.mm index 5be52d4..ed12cc4 100644 --- a/Source/WebKit2/Shared/mac/WebMemorySampler.mac.mm +++ b/Source/WebKit2/Shared/mac/WebMemorySampler.mac.mm @@ -23,18 +23,19 @@ * */ -#if ENABLE(MEMORY_SAMPLER) +#import "config.h" +#import "WebMemorySampler.h" -#include "WebMemorySampler.h" +#if ENABLE(MEMORY_SAMPLER) -#include <JavaScriptCore/MemoryStatistics.h> -#include <mach/mach.h> -#include <mach/task.h> -#include <mach/mach_types.h> -#include <malloc/malloc.h> -#include <runtime/JSLock.h> -#include <WebCore/JSDOMWindow.h> -#include <wtf/CurrentTime.h> +#import <JavaScriptCore/MemoryStatistics.h> +#import <mach/mach.h> +#import <mach/task.h> +#import <mach/mach_types.h> +#import <malloc/malloc.h> +#import <runtime/JSLock.h> +#import <WebCore/JSDOMWindow.h> +#import <wtf/CurrentTime.h> using namespace WebCore; using namespace JSC; @@ -115,9 +116,8 @@ WebMemoryStatistics WebMemorySampler::sampleWebKit() const totalBytesCommitted += fastMallocBytesCommitted; JSLock lock(SilenceAssertionsOnly); - MarkedSpace::Statistics heapMemoryStats = heapStatistics(JSDOMWindow::commonJSGlobalData()); - size_t jscHeapBytesInUse = heapMemoryStats.size - heapMemoryStats.free; - size_t jscHeapBytesCommitted = heapMemoryStats.size; + size_t jscHeapBytesInUse = JSDOMWindow::commonJSGlobalData()->heap.size(); + size_t jscHeapBytesCommitted = JSDOMWindow::commonJSGlobalData()->heap.capacity(); totalBytesInUse += jscHeapBytesInUse; totalBytesCommitted += jscHeapBytesCommitted; |