This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
non claimed thread stack and guard pages.
- From: Ravi Sankar <ravisankar dot g at gmail dot com>
- To: libc-help at sourceware dot org
- Cc: ravisankar dot g at gmail dot com
- Date: Mon, 5 Oct 2009 01:43:16 +0530
- Subject: non claimed thread stack and guard pages.
Hello,
In one of our widget launcher application we create multiple threads
with some in Detached state and other in joinable state. For the join
able state threads we also do pthread_join for them.? These threads
are created and destroyed for each new widget launch.
What we observe is that as widgets are launched and closed the VM
mappings also growing linearly. ? Where the unmapped regions are
"rwxp" permissions and anonymous, followed by "---p" of 4K size. What
I believe is that these are the stack region and guard pages of the
threads which are created. Due in course the entire VM gets exhausted
and my program terminates due to lack of VM.
My question is
1 > why does these regions are not reclaimed after the thread exits as
supposed to be for detached state threads?.
2> Why stack has to have Execute permissions?
I am using glibc 2.5 (NPTL) on ARM and Linux 2.6.24.
--
--,
BR,
Ravi Sankar Guntur.