aboutsummaryrefslogtreecommitdiff
path: root/mem/src
diff options
context:
space:
mode:
Diffstat (limited to 'mem/src')
-rw-r--r--mem/src/mem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mem/src/mem.c b/mem/src/mem.c
index ff97f0f..056d947 100644
--- a/mem/src/mem.c
+++ b/mem/src/mem.c
@@ -181,3 +181,8 @@ size_t mem_get_chunk_handle_(const Memory* mem, const void* chunk) {
181 assert(block_byte_index % mem->block_size_bytes == 0); 181 assert(block_byte_index % mem->block_size_bytes == 0);
182 return block_byte_index / mem->block_size_bytes; 182 return block_byte_index / mem->block_size_bytes;
183} 183}
184
185size_t mem_capacity_(const Memory* mem) {
186 assert(mem);
187 return mem->num_blocks * mem->block_size_bytes;
188}