diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-08-23 17:03:55 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-08-23 17:03:55 -0700 |
commit | 1c3d23da37923f59f50509d3939d1b9b8f81e108 (patch) | |
tree | 47c96c4c235c884606b8c9e71d89e9fc56c63465 /tests | |
parent | d8bdda582bc7f4d56f882fd3e43833880c3800da (diff) | |
download | xrdp-proprietary-1c3d23da37923f59f50509d3939d1b9b8f81e108.tar.gz xrdp-proprietary-1c3d23da37923f59f50509d3939d1b9b8f81e108.zip |
tests: add get_alloced_bytes function
Diffstat (limited to 'tests')
-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 |