Title: [149165] trunk/Source/_javascript_Core
- Revision
- 149165
- Author
- [email protected]
- Date
- 2013-04-25 19:47:26 -0700 (Thu, 25 Apr 2013)
Log Message
SuperRegion doesn't call deallocate() on its PageReservation
https://bugs.webkit.org/show_bug.cgi?id=115208
Reviewed by Geoffrey Garen.
It should. This doesn't cause us to leak physical memory, but it does cause us to leak virtual
address space (and probably mach ports), which is also bad :-( FixedVMPoolExecutableAllocator
also has this bug, but it doesn't matter much because there's only one instance of that class
throughout the entire lifetime of the process, whereas each VM has its own SuperRegion.
* heap/SuperRegion.cpp:
(JSC::SuperRegion::~SuperRegion):
* heap/SuperRegion.h:
(SuperRegion):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(FixedVMPoolExecutableAllocator):
(JSC::FixedVMPoolExecutableAllocator::~FixedVMPoolExecutableAllocator):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (149164 => 149165)
--- trunk/Source/_javascript_Core/ChangeLog 2013-04-26 02:30:11 UTC (rev 149164)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-04-26 02:47:26 UTC (rev 149165)
@@ -1,3 +1,23 @@
+2013-04-25 Mark Hahnenberg <[email protected]>
+
+ SuperRegion doesn't call deallocate() on its PageReservation
+ https://bugs.webkit.org/show_bug.cgi?id=115208
+
+ Reviewed by Geoffrey Garen.
+
+ It should. This doesn't cause us to leak physical memory, but it does cause us to leak virtual
+ address space (and probably mach ports), which is also bad :-( FixedVMPoolExecutableAllocator
+ also has this bug, but it doesn't matter much because there's only one instance of that class
+ throughout the entire lifetime of the process, whereas each VM has its own SuperRegion.
+
+ * heap/SuperRegion.cpp:
+ (JSC::SuperRegion::~SuperRegion):
+ * heap/SuperRegion.h:
+ (SuperRegion):
+ * jit/ExecutableAllocatorFixedVMPool.cpp:
+ (FixedVMPoolExecutableAllocator):
+ (JSC::FixedVMPoolExecutableAllocator::~FixedVMPoolExecutableAllocator):
+
2013-04-25 Filip Pizlo <[email protected]>
DFG doesn't support to_jsnumber
Modified: trunk/Source/_javascript_Core/heap/SuperRegion.cpp (149164 => 149165)
--- trunk/Source/_javascript_Core/heap/SuperRegion.cpp 2013-04-26 02:30:11 UTC (rev 149164)
+++ trunk/Source/_javascript_Core/heap/SuperRegion.cpp 2013-04-26 02:47:26 UTC (rev 149165)
@@ -47,6 +47,11 @@
#endif
}
+SuperRegion::~SuperRegion()
+{
+ m_reservation.deallocate();
+}
+
void* SuperRegion::getAlignedBase(PageReservation& reservation)
{
for (char* current = static_cast<char*>(reservation.base()); current < static_cast<char*>(reservation.base()) + Region::s_regionSize; current += pageSize()) {
Modified: trunk/Source/_javascript_Core/heap/SuperRegion.h (149164 => 149165)
--- trunk/Source/_javascript_Core/heap/SuperRegion.h 2013-04-26 02:30:11 UTC (rev 149164)
+++ trunk/Source/_javascript_Core/heap/SuperRegion.h 2013-04-26 02:47:26 UTC (rev 149165)
@@ -37,6 +37,7 @@
class SuperRegion : public WTF::MetaAllocator {
public:
SuperRegion();
+ virtual ~SuperRegion();
protected:
virtual void* allocateNewSpace(size_t&);
Modified: trunk/Source/_javascript_Core/jit/ExecutableAllocatorFixedVMPool.cpp (149164 => 149165)
--- trunk/Source/_javascript_Core/jit/ExecutableAllocatorFixedVMPool.cpp 2013-04-26 02:30:11 UTC (rev 149164)
+++ trunk/Source/_javascript_Core/jit/ExecutableAllocatorFixedVMPool.cpp 2013-04-26 02:47:26 UTC (rev 149165)
@@ -72,6 +72,8 @@
startOfFixedExecutableMemoryPool = reinterpret_cast<uintptr_t>(m_reservation.base());
}
}
+
+ virtual ~FixedVMPoolExecutableAllocator();
protected:
virtual void* allocateNewSpace(size_t&)
@@ -129,6 +131,11 @@
{
}
+FixedVMPoolExecutableAllocator::~FixedVMPoolExecutableAllocator()
+{
+ m_reservation.deallocate();
+}
+
bool ExecutableAllocator::isValid() const
{
return !!allocator->bytesReserved();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes