Next: , Previous: , Up: iklib   [Index]


6.10 Compensation stacks

Compensation stacks allow us to write code to allocate resources near the code that releases them; Allocating and releasing resources, for an overview of resource management under Vicare. Compensation stacks are described in:

Westley Weimer, George C. Necula. “Finding and Preventing Run–Time Error Handling Mistakes”. In Proceedings of the ACM Conference on Object–Oriented Programming, Systems, Languages, and Applications, 2004.

Vicare implements compensation stacks on top of the unwind protection mechanism, which allows operations to be performed synchronously with respect to the dynamic extent of a call to thunk. The unwind–protection mechanism.