Subject: Re: segmentation fault on fclose?
To: Andrew Gillham <gillham@andrews.edu>
From: Frank van der Linden <vdlinden@fwi.uva.nl>
List: current-users
Date: 09/12/1994 13:38:48
> Is this some kernel size limitation?  This same code (mSQL)
> is trying to use a 'buf[512 * 1024' and this is causing a
> segmentation fault.
> Is there anyway to fix this? (i.e. config file option)

Yes, this is a resource limit. The default stacksize limit is
512k. Use 'unlimit' in the shell before running the program,
or add some setrlimit() code to the program. The maximum size
is 8Mb, on i386 at least (see /usr/include/machine/vmparam.h).

You _could_ probably put any of the defines in the config file
(options DFLSSIZ=somebignumber, etc), because vmparam.h has
#ifndefs around those defines. But if some user program includes
<machine/vmparam.h> it might get very confused by that, so I don't
think that would be a good idea.

- Frank