summaryrefslogtreecommitdiffstats
path: root/src/AllocationPool.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-05-21 22:30:08 +0200
committerTycho <work.tycho+git@gmail.com>2014-05-21 22:30:08 +0200
commit4124eac15d6b545b685e58f9f5f3a0266c1d8df0 (patch)
tree1b9f3534697c01024d911681ab2a6693e4a8d785 /src/AllocationPool.h
parentImplemented Allocation Pool (diff)
downloadcuberite-4124eac15d6b545b685e58f9f5f3a0266c1d8df0.tar
cuberite-4124eac15d6b545b685e58f9f5f3a0266c1d8df0.tar.gz
cuberite-4124eac15d6b545b685e58f9f5f3a0266c1d8df0.tar.bz2
cuberite-4124eac15d6b545b685e58f9f5f3a0266c1d8df0.tar.lz
cuberite-4124eac15d6b545b685e58f9f5f3a0266c1d8df0.tar.xz
cuberite-4124eac15d6b545b685e58f9f5f3a0266c1d8df0.tar.zst
cuberite-4124eac15d6b545b685e58f9f5f3a0266c1d8df0.zip
Diffstat (limited to 'src/AllocationPool.h')
-rw-r--r--src/AllocationPool.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/AllocationPool.h b/src/AllocationPool.h
index f03897f98..f1e324953 100644
--- a/src/AllocationPool.h
+++ b/src/AllocationPool.h
@@ -43,6 +43,10 @@ class AllocationPool {
void Free(T* ptr)
{
m_FreeList.push_front(ptr);
+ if (m_FreeList.size() == BufferSize)
+ {
+ StarvationCallbacks.OnStopUsingBuffer();
+ }
}
private: