How to increase the stack size in SCO5

Arturo José Montes Sinning mitosys@colomsat.net.co
Thu May 18 06:33:00 GMT 2000


Hi Uday

This seem a bug in FSU pthread library no in gcc 2-95. I did the initial
port and a long time ago got an identical problem and found that GNU malloc
library (used with FSU pthreads) is incompatible with SCO malloc and changed
a line of code in io.c and prevent the FSU makefile to build the library
using GNU malloc and the problem was over.

This behaviour is present only when you spawn threads frequently in a thread
per request model or a thread per connection model.

If you has the right version this change must work ok in otherwise you will
get memory fault or memory corruption because than exist other changes to do
SCO malloc packaged thread safe.

Good luck,

Arturo



> Hello,
>            I am writing a complex application in SCO5 environment, in
which
> I am spawning multiple threads simultaneously to process the request. I am
> using gcc compiler and FSU thread library. The number of threads spawned
> simultaneously varies from 1 - 30. I am seeing a huge memory leak when
ever
> there are more than 5 threads spawned simultaneously. I think it is
because
> of the stack restriction. Is there any option available in the gcc
compiler
> to increase the stack size.
> I am using 2.95apr version of gcc. I am writing this application for x86
> machines.
> When I checked your web site I got a option fno-stack-limit to make the
> stack size unlimited.
> But when I include this option in my makefile it gave "cc1plus : invalid
> option - fno-stack-limit", but the thing is if I include fstack-check
> option in the makefile, it will compile properly.
> I would appreciate if anybody reply to this mail with solution.
>
> Waiting for your kind response
>
> Regards,
> Uday.
>



More information about the Gcc-bugs mailing list