Eike Lange eike.lange@uni-essen.de writes:
Thorsten and I use a very (possibly, depending on the source-size) large stack for the "pindent"- program. Are there any limitations for stack-size on some systems, gpc runs on?
Stack sizes can be set by ulimit on some systems. On such systems, it may be set as low as 2Mb. It is set at either 4Mb or 8Mb on all the servers we use here though.
For large allocations, it is usually better to use a more permanent storage mechanism
Nick.
Nick Burrett wrote:
Eike Lange eike.lange@uni-essen.de writes:
Thorsten and I use a very (possibly, depending on the source-size) large stack for the "pindent"- program. Are there any limitations for stack-size on some systems, gpc runs on?
Stack sizes can be set by ulimit on some systems. On such systems, it may be set as low as 2Mb. It is set at either 4Mb or 8Mb on all the servers we use here though.
On DJGPP, you can set the size with a declaration(!) like the following (no statement necessary). But AFAIR, this memory is then allocated permanently (because DJGPP can't dynamically resize the stack), so using more than, say, 4 or 8 MB would be problematic...
{$ifdef DJGPP} const MinStackSize : Cardinal = $400000; asmname '_stklen'; {$endif}
For large allocations, it is usually better to use a more permanent storage mechanism
Agreed.
Frank
Hi!
On Wed, Oct 25, 2000 at 10:34:29AM +0100, Nick Burrett wrote:
Eike Lange eike.lange@uni-essen.de writes:
Thorsten and I use a very (possibly, depending on the source-size) large stack for the "pindent"- program. Are there any limitations for stack-size on some systems, gpc runs on?
Stack sizes can be set by ulimit on some systems. On such systems, it may be set as low as 2Mb. It is set at either 4Mb or 8Mb on all the servers we use here though. For large allocations, it is usually better to use a more permanent storage mechanism
I'm sorry, my question was not detailled enough :-(
We use stacks of this form:
Type StackElementPtr = ^StackElement; StackElement = Record foo : aType; next : StackElementPtr; End;
But 2MB seem to be enough space for most sources :-)
Eike
Eike Lange wrote:
Hi!
On Wed, Oct 25, 2000 at 10:34:29AM +0100, Nick Burrett wrote:
Eike Lange eike.lange@uni-essen.de writes:
Thorsten and I use a very (possibly, depending on the source-size) large stack for the "pindent"- program. Are there any limitations for stack-size on some systems, gpc runs on?
Stack sizes can be set by ulimit on some systems. On such systems, it may be set as low as 2Mb. It is set at either 4Mb or 8Mb on all the servers we use here though. For large allocations, it is usually better to use a more permanent storage mechanism
I'm sorry, my question was not detailled enough :-(
We use stacks of this form:
Type StackElementPtr = ^StackElement; StackElement = Record foo : aType; next : StackElementPtr; End;
Being defined as pointers, I assume you allocate them on the heap (with `New'). So, you may be using a stack-like data structure, but technically it's not on the stack, so no problem.
(The heap should always be the most available kind of memory, i.e. everything that's not used otherwise. -- There's also a ulimit for memory in general, but if that's set to a low value, that's probably intentional, and the user should accept that he can't run the program or talk to his admin... ;-)
Frank
Eike Lange a écrit :
Hi!
On Wed, Oct 25, 2000 at 10:34:29AM +0100, Nick Burrett wrote:
Eike Lange eike.lange@uni-essen.de writes:
Thorsten and I use a very (possibly, depending on the source-size) large stack for the "pindent"- program. Are there any limitations for stack-size on some systems, gpc runs on?
Stack sizes can be set by ulimit on some systems. On such systems, it may be set as low as 2Mb. It is set at either 4Mb or 8Mb on all the servers we use here though. For large allocations, it is usually better to use a more permanent storage mechanism
I'm sorry, my question was not detailled enough :-(
We use stacks of this form:
Type StackElementPtr = ^StackElement; StackElement = Record foo : aType; next : StackElementPtr; End;
So in fact it is allocated on the heap by new, not on the stack: the name is confusing. There are limitations in stack size for DJGPP (256k by default) but not for the heap: all DPMI+swap size is available.
Hope this helps
Maurice