Title: [116593] trunk/Source/_javascript_Core
- Revision
- 116593
- Author
- [email protected]
- Date
- 2012-05-09 18:31:59 -0700 (Wed, 09 May 2012)
Log Message
JIT memory allocator is not returning memory to the OS on Darwin
https://bugs.webkit.org/show_bug.cgi?id=86047
<rdar://problem/11414948>
Reviewed by Geoff Garen.
Work around the problem by using a different madvise() flag, but only for the JIT memory
allocator. Also put in ASSERTs that the call is actually working.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolExecutableAllocator::notifyNeedPage):
(JSC::FixedVMPoolExecutableAllocator::notifyPageIsFree):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (116592 => 116593)
--- trunk/Source/_javascript_Core/ChangeLog 2012-05-10 01:21:14 UTC (rev 116592)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-05-10 01:31:59 UTC (rev 116593)
@@ -1,5 +1,20 @@
2012-05-09 Filip Pizlo <[email protected]>
+ JIT memory allocator is not returning memory to the OS on Darwin
+ https://bugs.webkit.org/show_bug.cgi?id=86047
+ <rdar://problem/11414948>
+
+ Reviewed by Geoff Garen.
+
+ Work around the problem by using a different madvise() flag, but only for the JIT memory
+ allocator. Also put in ASSERTs that the call is actually working.
+
+ * jit/ExecutableAllocatorFixedVMPool.cpp:
+ (JSC::FixedVMPoolExecutableAllocator::notifyNeedPage):
+ (JSC::FixedVMPoolExecutableAllocator::notifyPageIsFree):
+
+2012-05-09 Filip Pizlo <[email protected]>
+
It should be possible to get useful debug logging from the JIT memory allocator
https://bugs.webkit.org/show_bug.cgi?id=86042
Modified: trunk/Source/_javascript_Core/jit/ExecutableAllocatorFixedVMPool.cpp (116592 => 116593)
--- trunk/Source/_javascript_Core/jit/ExecutableAllocatorFixedVMPool.cpp 2012-05-10 01:21:14 UTC (rev 116592)
+++ trunk/Source/_javascript_Core/jit/ExecutableAllocatorFixedVMPool.cpp 2012-05-10 01:31:59 UTC (rev 116593)
@@ -78,12 +78,26 @@
virtual void notifyNeedPage(void* page)
{
+#if OS(DARWIN)
+ UNUSED_PARAM(page);
+#else
m_reservation.commit(page, pageSize());
+#endif
}
virtual void notifyPageIsFree(void* page)
{
+#if OS(DARWIN)
+ for (;;) {
+ int result = madvise(page, pageSize(), MADV_FREE);
+ if (!result)
+ return;
+ ASSERT(result == -1);
+ ASSERT(errno == EAGAIN);
+ }
+#else
m_reservation.decommit(page, pageSize());
+#endif
}
private:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes