Ada uses a "secondary stack" to hold locally declared objects and temporaries whose size is not known at compile time. This secondary stack is managed using a "mark/release" discipline (for background, see "mark-and-release" in http://www.flounder.com/memory_allocation.htm). "rts_ss_mark" does a "mark" on the secondary stack, "rts_ss_release" releases everything on the secondary stack back to the specified mark. In the above example, a "mark" is saved into pointer_1 at the beginning of a series of operations, and then a "release" is performed at appropriate points to recover the storage that had been allocated on the secondary stack, by operations such as "rts_ss_char_concat" which concatenates two strings into a temporary result on the secondary stack.
MapuSoft
Comments