[fpc-pascal]Issues regarding available memory

Alan Mead cubrewer at yahoo.com
Fri May 16 22:57:38 CEST 2003

--- Alan Mead <cubrewer at yahoo.com> wrote:

> Given that the heap grows, how can I determine the maximum
> available
> memory (in a platform-independent way)?  
> I thought I would GetMem() until it reports nil but that does not
> apparently work... Or I am confused about the cause of error 216. 
> (Or I made a dumb mistake. :)  When I compile my code (below) using
> FPC 1.0.4 and run it on my Linux machine, I see:
> [amead at alan ian]$ ./dummy
> Total heap available is 262128 bytes
> Largest block available is 262128 bytes
> size=44000000 (storage=352000000)
> getmem() was successful
> ..[lots of dots]..OK
> size=48400000 (storage=387200000)
> Runtime error 216 at 0x0804EB61
>   0x0804EB61
>   0x0804E730
>   0x08052263
>   0x080480B0
>   0x00000000

I noticed that 1.0.4 is out of date so I tried this program on my
Windows 2000 computer which has 1.0.6 and I get very similar results
except the error is 203 rather than 216.

I usually assume that these things are my error but it seems like
this might possibly be a problem with the compiler?


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.

More information about the fpc-pascal mailing list