[fpc-pascal]Issues regarding available memory

Alan Mead cubrewer at yahoo.com
Sat May 17 14:59:21 CEST 2003


> 
> On vrijdag, mei 16, 2003, at 23:30 Europe/Brussels, Alan Mead
> wrote:
> 
> > Ah. I was looking for a nil pointer from GetMem.  But you're
> saying
> > that I never get it because the heap manager never refuses
> GetMem, it
> > just grows the heap or, if it cannot grow the heap, throws an
> error?
> 
> By default, yes. You can set "ReturnNilIfGrowHeapFails" to true
> (it's a 
> typed constant defined in the interface of the system unit which is
> 
> false by default) to get the behaviour you want though (and then
> you 

Thanks to the people who helped but this is not working, quite
possibly to my lack of knowledge.

This global variable should gte be available (i.e., I don't have to
explicitly use the system unit), right?  I tried adding both
spellings suggested and also upgrading my FPC but this won't compile
(see below).  Are these globals documented somewhere (I've printed
all four PDF manuals and I don't recall seeing these) or do I need to
unpack the system unit source to browse them?

-Alan

[amead at alan ian]$ ppc386 dummy.pas
Free Pascal Compiler version 1.0.4 [2000/12/18] for i386
Copyright (c) 1993-2000 by Florian Klaempfl
Target OS: Linux for i386
Compiling dummy.pas
dummy.pas(19,3) Error: Identifier not found RETURNNILIFGROWHEAPFAIL
dummy.pas(52) Fatal: There were 1 errors compiling module, stopping
[amead at alan ian]$ vi dummy.pas
[amead at alan ian]$ ppc386 dummy.pas
Free Pascal Compiler version 1.0.4 [2000/12/18] for i386
Copyright (c) 1993-2000 by Florian Klaempfl
Target OS: Linux for i386
Compiling dummy.pas
dummy.pas(19,3) Error: Identifier not found RETURNNILIFHEAPGROWFAIL
dummy.pas(52) Fatal: There were 1 errors compiling module, stopping
[amead at alan ian]$ ppc386 dummy.pas
Free Pascal Compiler version 1.0.6 [2002/05/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Linux for i386
Compiling dummy.pas
dummy.pas(19,3) Error: Identifier not found RETURNNILIFHEAPGROWFAIL
dummy.pas(52) Fatal: There were 1 errors compiling module, stopping
[amead at alan ian]$ vi dummy.pas
[amead at alan ian]$ ppc386 dummy.pas
Free Pascal Compiler version 1.0.6 [2002/05/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Linux for i386
Compiling dummy.pas
dummy.pas(19,3) Error: Identifier not found RETURNNILIFGROWHEAPFAIL
dummy.pas(52) Fatal: There were 1 errors compiling module, stopping

-Alan

=====
A Congressman was once asked about his attitude toward whiskey.  "If you mean the demon drink that poisons the mind, pollutes the body, desecrates family life, and inflames sinners, then I'm against it. "

"But if you mean the elixir of Christmas cheer, the shield against winter chill, the taxable potion that puts needed funds into public coffers to comfort little crippled children, then I'm for it."
 
"This is my position, and I will not compromise."

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com




More information about the fpc-pascal mailing list