Title: [149305] trunk/Source/_javascript_Core
- Revision
- 149305
- Author
- [email protected]
- Date
- 2013-04-29 12:52:05 -0700 (Mon, 29 Apr 2013)
Log Message
~BlockAllocator should ASSERT that it has no more Regions left
https://bugs.webkit.org/show_bug.cgi?id=115287
Reviewed by Andreas Kling.
* heap/BlockAllocator.cpp:
(JSC::BlockAllocator::~BlockAllocator):
(JSC::BlockAllocator::allRegionSetsAreEmpty):
* heap/BlockAllocator.h:
(RegionSet):
(JSC::BlockAllocator::RegionSet::isEmpty):
(BlockAllocator):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (149304 => 149305)
--- trunk/Source/_javascript_Core/ChangeLog 2013-04-29 19:08:31 UTC (rev 149304)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-04-29 19:52:05 UTC (rev 149305)
@@ -1,3 +1,18 @@
+2013-04-26 Mark Hahnenberg <[email protected]>
+
+ ~BlockAllocator should ASSERT that it has no more Regions left
+ https://bugs.webkit.org/show_bug.cgi?id=115287
+
+ Reviewed by Andreas Kling.
+
+ * heap/BlockAllocator.cpp:
+ (JSC::BlockAllocator::~BlockAllocator):
+ (JSC::BlockAllocator::allRegionSetsAreEmpty):
+ * heap/BlockAllocator.h:
+ (RegionSet):
+ (JSC::BlockAllocator::RegionSet::isEmpty):
+ (BlockAllocator):
+
2013-04-29 Mark Hahnenberg <[email protected]>
IndexingTypes should use hex
Modified: trunk/Source/_javascript_Core/heap/BlockAllocator.cpp (149304 => 149305)
--- trunk/Source/_javascript_Core/heap/BlockAllocator.cpp 2013-04-29 19:08:31 UTC (rev 149304)
+++ trunk/Source/_javascript_Core/heap/BlockAllocator.cpp 2013-04-29 19:52:05 UTC (rev 149305)
@@ -58,8 +58,18 @@
m_emptyRegionCondition.broadcast();
}
waitForThreadCompletion(m_blockFreeingThread);
+ ASSERT(allRegionSetsAreEmpty());
+ ASSERT(m_emptyRegions.isEmpty());
}
+bool BlockAllocator::allRegionSetsAreEmpty() const
+{
+ return m_copiedRegionSet.isEmpty()
+ && m_markedRegionSet.isEmpty()
+ && m_fourKBBlockRegionSet.isEmpty()
+ && m_workListRegionSet.isEmpty();
+}
+
void BlockAllocator::releaseFreeRegions()
{
while (true) {
Modified: trunk/Source/_javascript_Core/heap/BlockAllocator.h (149304 => 149305)
--- trunk/Source/_javascript_Core/heap/BlockAllocator.h 2013-04-29 19:08:31 UTC (rev 149304)
+++ trunk/Source/_javascript_Core/heap/BlockAllocator.h 2013-04-29 19:52:05 UTC (rev 149305)
@@ -71,6 +71,12 @@
, m_blockSize(blockSize)
{
}
+
+ bool isEmpty() const
+ {
+ return m_fullRegions.isEmpty() && m_partialRegions.isEmpty();
+ }
+
DoublyLinkedList<Region> m_fullRegions;
DoublyLinkedList<Region> m_partialRegions;
size_t m_numberOfPartialRegions;
@@ -79,6 +85,7 @@
DeadBlock* tryAllocateFromRegion(RegionSet&, DoublyLinkedList<Region>&, size_t&);
+ bool allRegionSetsAreEmpty() const;
void releaseFreeRegions();
template <typename T> RegionSet& regionSetFor();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes