Start a conversation

What is “rts_ss_mark” and “rts_ss_release” functions appearing in my converted code? I’m not sure I’m following what’s going on there…

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.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. MapuSoft

  2. Posted
  3. Updated

Comments