diff options
-rw-r--r-- | tests/memtest/libmem.c | 10 | ||||
-rw-r--r-- | tests/memtest/libmem.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/memtest/libmem.c b/tests/memtest/libmem.c index 2fa0dea7..f05ea481 100644 --- a/tests/memtest/libmem.c +++ b/tests/memtest/libmem.c @@ -402,3 +402,13 @@ libmem_clear_flags(void* obj, int flags) self->flags &= ~flags; return 0; } + +/*****************************************************************************/ +int +libmem_get_alloced_bytes(void* obj) +{ + struct mem_info* self; + + self = (struct mem_info*)obj; + return self->total_bytes; +} diff --git a/tests/memtest/libmem.h b/tests/memtest/libmem.h index 4bc4b1ec..cd000443 100644 --- a/tests/memtest/libmem.h +++ b/tests/memtest/libmem.h @@ -14,5 +14,7 @@ int libmem_set_flags(void* obj, int flags); int libmem_clear_flags(void* obj, int flags); +int +libmem_get_alloced_bytes(void* obj); #endif |