diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2019-09-01 11:48:01 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2019-09-01 11:48:01 -0400 |
commit | 5c41849e0e78e45db0dc4421f1779ef7bec726da (patch) | |
tree | ab2ac8627c02a10f763650d30d58aac4b4c372ab /node.c | |
parent | 8cc45af919dc56011dbf4c8965b9c1e4784e56d7 (diff) | |
download | egawk-5c41849e0e78e45db0dc4421f1779ef7bec726da.tar.gz egawk-5c41849e0e78e45db0dc4421f1779ef7bec726da.tar.bz2 egawk-5c41849e0e78e45db0dc4421f1779ef7bec726da.zip |
Hack the typeof function to return memory count info when the 2nd arg is PROCINFO.
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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; } |