From f0d60c8778bcf50f8720e0d26707d43b1ca7e76c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 22 Oct 1999 08:53:49 +0000 Subject: [PATCH] 19991022-10:41 GMT+1 --- harbour/ChangeLog | 6 ++++++ harbour/source/rtl/fm.c | 8 ++++++++ harbour/tests/memory.prg | 2 ++ 3 files changed, 16 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2c53cf3d76..d01159c418 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +19991022-10:41 GMT+1 Victor Szel + * source/rtl/fm.c + tests/memory.prg + + MEMORY() extended with 1003 and 1004 parameters, to retrieve stack + usage. + 19991022-10:33 GMT+1 Victor Szel * source/rtl/fm.c tests/memory.prg diff --git a/harbour/source/rtl/fm.c b/harbour/source/rtl/fm.c index 51850e3c74..e06a6f3f99 100644 --- a/harbour/source/rtl/fm.c +++ b/harbour/source/rtl/fm.c @@ -398,6 +398,14 @@ HARBOUR HB_MEMORY( void ) ulResult = s_ulMemoryMaxConsumed; break; + case 1003: /* Harbour extension (Total items on the stack) */ + ulResult = hb_stack.wItems; + break; + + case 1004: /* Harbour extension (Total memory size used by the stack [bytes]) */ + ulResult = hb_stack.wItems * sizeof( HB_ITEM ); + break; + default: ulResult = 0; } diff --git a/harbour/tests/memory.prg b/harbour/tests/memory.prg index 70da00b056..e175f5972d 100644 --- a/harbour/tests/memory.prg +++ b/harbour/tests/memory.prg @@ -18,5 +18,7 @@ FUNCTION Main() ? 105, MEMORY( 105 ) ? 1001, MEMORY( 1001 ) ? 1002, MEMORY( 1002 ) + ? 1003, MEMORY( 1003 ) + ? 1004, MEMORY( 1004 ) RETURN NIL