diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/memory.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memory.cpp b/src/memory.cpp index fb6c591..c5d8375 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -116,11 +116,11 @@ void *Pke_New(std::size_t sz, std::size_t alignment, MemBucket *bkt) { nextBlock->size += afterSize; } long moveCount = bkt->lastEmptyBlockIndex - index; + bkt->lastEmptyBlockIndex -= 1; if (moveCount > 0) { char *srcPos = bkt->blocks + (sizeof(MemBlock) * (index + 1)); char *dstPos = bkt->blocks + (sizeof(MemBlock) * (index + 0)); memmove(dstPos, srcPos, sizeof(MemBlock) * moveCount); - bkt->lastEmptyBlockIndex -= 1; } } } |
