From 5c41849e0e78e45db0dc4421f1779ef7bec726da Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 1 Sep 2019 11:48:01 -0400 Subject: Hack the typeof function to return memory count info when the 2nd arg is PROCINFO. --- node.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'node.c') diff --git a/node.c b/node.c index eacd17b3..5333e848 100644 --- a/node.c +++ b/node.c @@ -1026,11 +1026,11 @@ void init_btowc_cache() #define BLOCKCHUNK 100 struct block_header nextfree[BLOCK_MAX] = { - { NULL, sizeof(NODE) }, - { NULL, sizeof(BUCKET) }, + { NULL, sizeof(NODE), "node" }, + { NULL, sizeof(BUCKET), "bucket" }, #ifdef HAVE_MPFR - { NULL, sizeof(mpfr_t) }, - { NULL, sizeof(mpz_t) }, + { NULL, sizeof(mpfr_t), "mpfr" }, + { NULL, sizeof(mpz_t), "mpz" }, #endif }; @@ -1081,6 +1081,7 @@ more_blocks(int id) np->freep = next; } nextfree[id].freep = freep->freep; + nextfree[id].cnt += BLOCKCHUNK; return freep; } -- cgit v1.2.3