diff options
| author | Daniel C. Sobral <dcs@FreeBSD.org> | 2000-05-04 20:41:30 +0000 |
|---|---|---|
| committer | Daniel C. Sobral <dcs@FreeBSD.org> | 2000-05-04 20:41:30 +0000 |
| commit | 1ca3a0ce6adc6baa5848ea040497a57941309e64 (patch) | |
| tree | 385ff5c82ab4cbd5e1a0800c900f7a07f191e93e | |
| parent | f3cddbbdeb15bb2ff083ea16067ecb325fba4b4d (diff) | |
Notes
| -rw-r--r-- | sys/boot/ficl/words.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/boot/ficl/words.c b/sys/boot/ficl/words.c index 8ca612a216fb..5baf6fbc977a 100644 --- a/sys/boot/ficl/words.c +++ b/sys/boot/ficl/words.c @@ -4439,6 +4439,14 @@ static void ansResize(FICL_VM *pVM) } } +/* +** Retrieves free space remaining on the dictionary +*/ + +static void freeHeap(FICL_VM *pVM) +{ + stackPushINT(pVM->pStack, dictCellsAvail(ficlGetDict())); +} /* ** exit-inner @@ -4649,6 +4657,7 @@ void ficlCompileCore(FICL_DICT *dp) dictAppendWord(dp, "key?", keyQuestion, FW_DEFAULT); dictAppendWord(dp, "ms", ms, FW_DEFAULT); dictAppendWord(dp, "seconds", pseconds, FW_DEFAULT); + dictAppendWord(dp, "heap?", freeHeap, FW_DEFAULT); #ifdef FICL_TRACE dictAppendWord(dp, "trace!", ficlTrace, FW_DEFAULT); #endif |
