Article View: comp.sys.sun
Article #7416LWP - do stacks really return to the cache?
From: (Ken Warkentyne)
Date: Wed, 17 Apr 1991 01:00
Date: Wed, 17 Apr 1991 01:00
37 lines
1699 bytes
1699 bytes
If there are any LWP experts out there, I have a question for you. Does
LWP really recuperate the stacks of terminated threads? The documentation
says that it does yet my test program implies that it doesn't. The test
program is very small so here it is:
#include <lwp/lwp.h>
#include <lwp/stackdep.h>
thread_t tid1;
task1()
{
putchar('.');
};
main()
{
printf("main thread starting\n");
(void)pod_setmaxpri(MINPRIO);
lwp_setstkcache(80000,20);
for (;;) {
lwp_create(&tid1, task1, MINPRIO, LWPNOLASTRITES, lwp_newstk(), 0);
lwp_yield(tid1);
lwp_destroy(tid1);
}
}
The lwp_setstkcache command creates an initial stack cache with 20 80,000
byte stacks. After running for a couple of seconds on a sparc station,
the UNIX process containing the lwp threads exceeds the 90Mbyte virtual
memory limit on the machine. Changing the stack size merely changes the
amount of time that the process runs before dying.
Thanks,
Ken Warkentyne - warkent@ltisun.epfl.ch
Laboratoire de Teleinformatique, EPFL, Suisse.
Technical Details
Message-ID:
<2454@brchh104.bnr.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: warkent@ltisun.epfl.ch ((Ken Warkentyne)) Newsgroups: comp.sys.sun Subject: LWP - do stacks really return to the cache? Keywords: Miscellaneous Message-ID: <2454@brchh104.bnr.ca> Date: 17 Apr 91 01:00:00 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 37 Approved: Sun-Spots@rice.edu X-Original-Date: Tue, 2 Apr 1991 12:53:13 +0000 X-Sun-Spots-Digest: Volume 10, Issue 81, message 11 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu