diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-05-21 22:30:08 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-05-21 22:30:08 +0200 |
commit | 4124eac15d6b545b685e58f9f5f3a0266c1d8df0 (patch) | |
tree | 1b9f3534697c01024d911681ab2a6693e4a8d785 | |
parent | Implemented Allocation Pool (diff) | |
download | cuberite-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 |
-rw-r--r-- | src/AllocationPool.h | 4 |
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: |