diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2018-01-12 00:56:36 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-01-12 00:56:36 +0300 |
commit | c3fb80019f9df0f14528cddddbafa277fb4149f2 (patch) | |
tree | 71d52b3b77026d59ebd347eaacd67c7f25acfe7c /mallocx.c | |
parent | ff5a875bb4ceeffce412a08403dca84ba0a81840 (diff) | |
download | bdwgc-c3fb80019f9df0f14528cddddbafa277fb4149f2.tar.gz |
New API function (get_expl_freed_bytes_since_gc)
Note: this function could be used in test_cpp to check that the proper
operator delete is called.
* include/gc.h (GC_get_expl_freed_bytes_since_gc): New function
prototype.
* mallocx.c (GC_get_expl_freed_bytes_since_gc): New function definition
(which returns GC_bytes_freed).
Diffstat (limited to 'mallocx.c')
-rw-r--r-- | mallocx.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -259,6 +259,11 @@ GC_API void GC_CALL GC_incr_bytes_freed(size_t n) GC_bytes_freed += n; } +GC_API size_t GC_CALL GC_get_expl_freed_bytes_since_gc(void) +{ + return (size_t)GC_bytes_freed; +} + # ifdef PARALLEL_MARK STATIC volatile AO_t GC_bytes_allocd_tmp = 0; /* Number of bytes of memory allocated since */ |