summaryrefslogtreecommitdiff
path: root/include/gc.h
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2018-01-12 00:56:36 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-01-12 00:56:36 +0300
commitc3fb80019f9df0f14528cddddbafa277fb4149f2 (patch)
tree71d52b3b77026d59ebd347eaacd67c7f25acfe7c /include/gc.h
parentff5a875bb4ceeffce412a08403dca84ba0a81840 (diff)
downloadbdwgc-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 'include/gc.h')
-rw-r--r--include/gc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gc.h b/include/gc.h
index 6b50d29d..24a2bd0e 100644
--- a/include/gc.h
+++ b/include/gc.h
@@ -686,6 +686,10 @@ GC_API size_t GC_CALL GC_get_unmapped_bytes(void);
/* regarding thread-safety). */
GC_API size_t GC_CALL GC_get_bytes_since_gc(void);
+/* Return the number of explicitly deallocated bytes of memory since */
+/* the recent collection. This is an unsynchronized getter. */
+GC_API size_t GC_CALL GC_get_expl_freed_bytes_since_gc(void);
+
/* Return the total number of bytes allocated in this process. */
/* Never decreases, except due to wrapping. This is an unsynchronized */
/* getter (see GC_get_heap_size comment regarding thread-safety). */