Out-of-bounds pointers

Barry Margolin barmar at kulla
Wed Oct 18 02:25:50 AEST 1989


In article <252 at bbxsda.UUCP> scott at bbxsda.UUCP (Scott Amspoker) writes:
>While I fully agree that a pointer to "expired" stack data is to
>be considered "invalid" I am not aware of any implementation that
>actually removes stack memory from the memory map upon exit from
>a procedure.

Multics truncates the stack segment to the page containing the current
frame whenever the process goes blocked.  It's a system call so you're
in the kernel already, and blocks usually wait for a long time (most
blocking is for keyboard input), so the expense is not very
significant.  The benefit is that the extra pages needn't be swapped
out, so the next page fault(s) will be faster, and less swap space is
used.
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.std.c mailing list