Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m committed Jun 21, 2024
1 parent addd681 commit 530d52a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rmem.nim
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ proc free*(mempool: var MemPool, `ptr`: pointer) =
else:
# try to place it into bucket or large freelist.
if bucketSlot < MEMPOOL_BUCKET_SIZE:
insertMemNode(mempool, mempool.buckets[bucketSlot], memNode, bucketSlot < MEMPOOL_BUCKET_SIZE)
insertMemNode(mempool, mempool.buckets[bucketSlot], memNode, true)
else:
insertMemNode(mempool, mempool.large, memNode, bucketSlot < MEMPOOL_BUCKET_SIZE)
insertMemNode(mempool, mempool.large, memNode, false)

proc realloc*(mempool: var MemPool, `ptr`: pointer, size: Natural): pointer =
if size > mempool.arena.size:
Expand Down

0 comments on commit 530d52a

Please sign in to comment.