Re: TARGET .ALLOCATION

From: Bulgrien, Dennis <Dennis.Bulgrien_at_TripointGlobal.com>
Date: Tue, 7 Dec 2004 15:49:52 -0600

Here is a not-so-glorious method to approximate it. If memory is going to
be destroyed, the value may exclude the space for (/SIZE-USED-*DATA) because
it will be run before destruction. However, experience showed that the
value is even less; I don't know why.
________
debug.f:

TARGET
DEFER /SIZE-USED-CDATA
VARIABLE SIZE-USED-CDATA

: MAIN ( -- )
  /SIZE-USED-CDATA
  SIZE-USED-CDATA @ . ." CDATA used"
;

...

: GREET ( -- ) ...

: GO ( -- ) ...

: (/SIZE-USED-CDATA) ( -- )
  [ SAVE-SECTIONS ]
  [ CDATA HOST @SECTION SIZE-USED TARGET ] LITERAL SIZE-USED-CDATA !
  [ RESTORE-SECTIONS ]
;
' (/SIZE-USED-CDATA) IS /SIZE-USED-CDATA

-----Original Message-----
From: swiftx-bounce_at_forth.com [mailto:swiftx-bounce_at_forth.com]On Behalf
Of Bulgrien, Dennis
Sent: Tuesday, December 07, 2004 14:21

How can the amount of memory used in a given section (i.e. that displayed by
.ALLOCATION on an INCLUDE BUILD (F8)) be determined for run-time use?
...
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Tue Dec 07 2004 - 13:50:16 PST


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 08-Feb-2012. Archive updated nightly.