Hi,

I've started fixing up the thread creation stuff in pthreads, and
I've come upon a dilema. According to SUSv2, the programmer
is allowed to create a thread with specified stack location and
size. If that information is not provided, then a stack of some
default size is allocated with an extra page at the end of
the stack to create a "red zone" to detect overflows.

How is it possible to create a "red zone" if the stack has already
been allocated by the programmer. It is not garanteed that we can
snag a page of memory located contiguously after the provided stack
space. And we can't take off the last page from the user provided
stack because he's garanteed at least the provided stack size.

In this case, should the creation of the "red zone" be the programmer's
responsibility, or is there a way to create it with the library?

It is also possible that I'm misinterpreting the standard, if so, please
let me know.

Thanks.

Igor

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to