diff options
Diffstat (limited to 'libpthread.mdwn')
-rw-r--r-- | libpthread.mdwn | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libpthread.mdwn b/libpthread.mdwn index e74bbcb2..801a1a79 100644 --- a/libpthread.mdwn +++ b/libpthread.mdwn @@ -39,6 +39,27 @@ There has also been an incomplete and unmaintained PowerPC port which has been removed in commit a5387f6a45d6b3f2b381d861f5c288b79da6204f. +## Threading Model + +libpthread has a 1:1 threading model. + + +## Threads' Death + +A thread's death doesn't actually free the thread's stack (and maybe not the +associated Mach ports either). That's because there's no way to free the stack +after the thread dies (because the thread of control is gone); the stack needs +to be freed by something else, and there's nothing convenient to do it. There +are many ways to make it work. + +However, it isn't really a leak, because the unfreed resources do get used for +the next thread. So the issue is that the shrinkage of resource consumption +never happens, but it doesn't grow without bounds; it just stays at the maximum +even if the current number of threads is lower. + +The same issue exists in [[hurd/libthreads]]. + + # Open Issues [[!inline pages=tag/open_issue_libpthread raw=yes feeds=no]] |