Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2004-11

re: Find error? ... memory

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

David Emerson
Regarding the EOutOfMemory exception, is that thrown only when all (physical+virtual) memory is exhausted?

I don't know, but perhaps you need a bigger stack and/or heap. (We've had to increase ours a couple times; I don't know what the defaults are)

From the programmer's manual:
{$M StackSize, HeapSize}
where StackSize and HeapSize are integer values, greater than 1024. [...] (Stack setting is ignored under linux, netbsd and freebsd)

Although in my experience, the stack setting is not ignored under linux. We have hit stack overflow errors which went away after increasing the stack size with this setting. So maybe it depends on the kernel or the version of fpc... dunno. Incidentally, we were recently having some trouble with stack overflows with the 2.6.7 kernel, and went back to 2.4.26, which seems to work fine.

~D.

Peter Vreman
to David Emerson
Show quoted text 17 lines
> Regarding the EOutOfMemory exception, is that thrown only when all > (physical+virtual) memory is exhausted? I don't know, but perhaps you need a bigger stack and/or heap. (We've had to increase ours a couple times; I don't know what the defaults are) From the programmer's manual: {$M StackSize, HeapSize} where StackSize and HeapSize are integer values, greater than 1024. [...] (Stack setting is ignored under linux, netbsd and freebsd) Although in my experience, the stack setting is not ignored under linux. We have hit stack overflow errors which went away after increasing the stack size with this setting. So maybe it depends on the kernel or the version of fpc... dunno. Incidentally, we were recently having some trouble with stack overflows with the 2.6.7 kernel, and went back to 2.4.26, which seems to work fine.

Stack checking is rewritten in 1.9.x. It is now platform independent. The remark in the programmers manual is from the 1.0.x series