Stack size

Steen Jansdal steen@jansdal.dk
Wed Dec 5 23:40:00 GMT 2001


The reason I'm asking this is that I'm trying to evaluate if Linux 
on a x86 is going to be the platform for our next embedded 
device. The memory on this device are limited to 16 or 32 Mb.
The programs for this device are going to heavy multithreaded,
and consist of a web-server, a soap-server and several user
programs. It is my highest wish that we can use java as our
language. C++ is too difficult to maintain.
Any advices for my evaluation are much appreciated.
Steen Jansdal
----- Original Message ----- 
From: "Bryce McKinlay" <bryce@waitaki.otago.ac.nz>
To: "Steen Jansdal" <steen@jansdal.dk>
Cc: <java@gcc.gnu.org>
Sent: Thursday, December 06, 2001 1:14 AM
Subject: Re: Stack size
> Steen Jansdal wrote:
>> >Newbie question:
> >
> >What is the stack size for each thread?
> >
>> It depends on the platform. On linux, it depends on the kernel and glibc 
> version. Its more appropriate to talk about stack size limits since the 
> stack will automatically grow as needed up to a certain limit. On 
> PowerPC, the stacks seem to be allocated at fixed addresses 2MB apart so 
> the limit is therefore 2MB. On x86, the newwer glibc's use the kernel's 
> "floating stack" feature and the size limit is more like 32MB or 64MB I 
> think. 
>> >Is it possible to change the stack size on
> >a per-thread basis?
> >
>> The pthread API does have a pthread_attr_setstacksize() which allows you 
> to set a minimum stack size. I suspect it doesn't do much to call this 
> on linux. Why do you want to explicitly set the stack size?
>> regards
>> Bryce.
>>>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /