bmalloc: Rename SmallPage to SmallRun
[WebKit-https.git] / Source / bmalloc / bmalloc / VMHeap.h
index d73f0af..cf28f29 100644 (file)
@@ -50,11 +50,11 @@ class VMHeap {
 public:
     VMHeap();
 
-    SmallPage* allocateSmallPage(std::lock_guard<StaticMutex>&);
+    SmallRun* allocateSmallRun(std::lock_guard<StaticMutex>&);
     LargeObject allocateLargeObject(std::lock_guard<StaticMutex>&, size_t);
     LargeObject allocateLargeObject(std::lock_guard<StaticMutex>&, size_t, size_t, size_t);
 
-    void deallocateSmallPage(std::unique_lock<StaticMutex>&, SmallPage*);
+    void deallocateSmallRun(std::unique_lock<StaticMutex>&, SmallRun*);
     void deallocateLargeObject(std::unique_lock<StaticMutex>&, LargeObject);
     
 private:
@@ -62,7 +62,7 @@ private:
     LargeObject allocateLargeChunk(std::lock_guard<StaticMutex>&);
     void allocateSuperChunk(std::lock_guard<StaticMutex>&);
 
-    List<SmallPage> m_smallPages;
+    List<SmallRun> m_smallRuns;
     SegregatedFreeList m_largeObjects;
 
     Vector<SuperChunk*> m_smallChunks;
@@ -73,14 +73,14 @@ private:
 #endif
 };
 
-inline SmallPage* VMHeap::allocateSmallPage(std::lock_guard<StaticMutex>& lock)
+inline SmallRun* VMHeap::allocateSmallRun(std::lock_guard<StaticMutex>& lock)
 {
-    if (m_smallPages.isEmpty())
+    if (m_smallRuns.isEmpty())
         allocateSmallChunk(lock);
 
-    SmallPage* page = m_smallPages.pop();
-    vmAllocatePhysicalPages(page->begin()->begin(), vmPageSize);
-    return page;
+    SmallRun* run = m_smallRuns.pop();
+    vmAllocatePhysicalPages(run->begin()->begin(), vmPageSize);
+    return run;
 }
 
 inline LargeObject VMHeap::allocateLargeObject(std::lock_guard<StaticMutex>& lock, size_t size)
@@ -101,13 +101,13 @@ inline LargeObject VMHeap::allocateLargeObject(std::lock_guard<StaticMutex>& loc
     return allocateLargeChunk(lock);
 }
 
-inline void VMHeap::deallocateSmallPage(std::unique_lock<StaticMutex>& lock, SmallPage* page)
+inline void VMHeap::deallocateSmallRun(std::unique_lock<StaticMutex>& lock, SmallRun* run)
 {
     lock.unlock();
-    vmDeallocatePhysicalPages(page->begin()->begin(), vmPageSize);
+    vmDeallocatePhysicalPages(run->begin()->begin(), vmPageSize);
     lock.lock();
     
-    m_smallPages.push(page);
+    m_smallRuns.push(run);
 }
 
 inline void VMHeap::deallocateLargeObject(std::unique_lock<StaticMutex>& lock, LargeObject largeObject)