summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-03-24 08:54:01 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-03-24 21:57:00 +0300
commit4d83569d52df353ccfaa1575cda612035eb6336e (patch)
treefe2ed21318f6874404efc5a5646e4ac4531e877b
parent8a0d76377235ec1a3cecb44c4d21eef769277854 (diff)
downloadbdwgc-4d83569d52df353ccfaa1575cda612035eb6336e.tar.gz
Increment allocated objects count after GC_GCJ_MALLOC() in gctest
* tests/gctest.c [GC_GCJ_SUPPORT] (gcj_cons): Increment collectable_count.
-rw-r--r--tests/gctest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/gctest.c b/tests/gctest.c
index 3e033704..0715ba40 100644
--- a/tests/gctest.c
+++ b/tests/gctest.c
@@ -431,6 +431,7 @@ sexpr small_cons_uncollectable (sexpr x, sexpr y)
: GC_GCJ_MALLOC(lb, d);
CHECK_OUT_OF_MEMORY(r);
+ AO_fetch_and_add1(&collectable_count);
result = (sexpr)((GC_word *)r + 1);
result -> sexpr_car = x;
GC_PTR_STORE_AND_DIRTY(&result->sexpr_cdr, y);