Guard page

A guard page is a special page in memory that has its OS-level page protection bit set. Thus, trying to dereference the page will throw an exception. This is used, for example, as a mechanism to detect stack overflows by keeping guard pages at the end of the stack. It can also be used for implementing safepoints, by protecting a previously unprotected guard page that is dereferenced from the generated code at a given safepoint. This makes the runtime throw an exception the next time that safepoint is reached, and control can be halted in a structured manner.

See also Safepoint and Livemap.

Get Oracle JRockit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.