##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: August, 2016 # Modified: 2016-10-03/22:45-0400 ##+ # # show collections, create and remove a string, reshow collections # procedure main() collections() s := repl(&letters, 1000) s := &null collect() write("\nAfter string create/remove") collections() end # Display current memory region allocations procedure collections() local collects collects := [] ; every put(collects, &collections) write("Collections, ", *collects, " values generated") write(repl("-", 30 + **collects)) write("Heap : ", collects[1]) write("Static : ", collects[2]) write("String : ", collects[3]) write("Block : ", collects[4]) end