[haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize
- From: "bonefish" <trac@xxxxxxxxxxxx>
- Date: Sun, 12 Feb 2012 23:54:18 -0000
#8233: Patch for pthread_attr_getguardsize
--------------------------+------------------------------------------------
Reporter: unitedroad | Owner: nobody
Type: | Status: new
enhancement | Milestone: R1
Priority: normal | Version: R1/Development
Component: | Keywords: pthread, pthread_attr_getguardsize
System/POSIX | Blocking:
Resolution: | Platform: All
Blocked By: |
Has a Patch: 1 |
--------------------------+------------------------------------------------
Comment (by bonefish):
Replying to [comment:7 hamish]:
> Currently the {{{B_STACK_AREA}}} flag is passed to
{{{create_area_etc()}}}, which makes it pass the
{{{USER_STACK_GUARD_PAGES}}} constant to
{{{VMCacheFactory::CreateAnonymousCache()}}}.
>
> Would it be desirable to add an extra parameter to
{{{create_area_etc()}}} for guard size? Or is it possible to simply guard
the pages manually with {{{_user_set_memory_protection()}}} in
{{{create_thread_user_stack()}}}?
The guard size should be passed to `create_area_etc()` directly. This way
the explicit support for guard pages in the anonymous caches will be used.
Setting the memory protection would have the same effect from the
perspective of the userland (well, at least as long as the program doesn't
meddle with the memory protections itself), but it has more overhead in
the kernel (the page protection array needs to be allocated).
--
Ticket URL: <http://dev.haiku-os.org/ticket/8233#comment:8>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.
Other related posts:
- » [haiku-bugs] [Haiku] #8233: Patch for pthread_attr_getguardsize - unitedroad
- » [haiku-bugs] [Haiku] #8233: Patch for pthread_attr_getguardsize - unitedroad
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - unitedroad
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - bonefish
- » [haiku-bugs] [Haiku] #8233: Patch for pthread_attr_getguardsize - unitedroad
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - unitedroad
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - bonefish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - bonefish
- » [haiku-bugs] [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - korli
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - bonefish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - bonefish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - bonefish
- » [haiku-bugs] [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - mmadia
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - korli
- » [haiku-bugs] [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - korli
- » [haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize - hamish