This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]