mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
Add heap?, so we can tell how much free space we have left.
This commit is contained in:
parent
f3cddbbdeb
commit
1ca3a0ce6a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60000
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user