tests: add get_alloced_bytes function

This commit is contained in:
Jay Sorg 2013-08-23 17:03:55 -07:00
parent d8bdda582b
commit 1c3d23da37
2 changed files with 12 additions and 0 deletions

View File

@ -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;
}

View File

@ -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