Task

Show how to explicitly allocate and deallocate blocks of memory in your language.

Show access to different types of memory (i.e., heap, stack, shared, foreign) if applicable.




unused .  \ memory available for use in dictionary
here .    \ current dictionary memory pointer
: mem, ( addr len -- ) here over allot swap move ;
: s, ( str len -- ) here over char+ allot place align ;   \ built-in on some forths
: ,"  [char] " parse s, ;
variable num
create array  60 cells allot
create struct  0 , 10 ,  char A c,  ," string"
unused .
here .