[fpc-pascal] FPC Heap Management : sub-allocation ?

Sven Barth pascaldragon at googlemail.com
Fri Oct 31 15:41:01 CET 2014


Am 31.10.2014 15:21 schrieb "Brian" <vmst at golden.net>:
>
> Does FPC implement sub-allocation  , in which the user program allocates a
> block of memory from the heap , and only "plays" in that sub-allocated
block
> , such that if the user program has a serious memory leak , the user
program
> may crash but it cannot exhaust the OS memory and cause the OS to crash?
>
> ... sorry for the long winded sentence.

FPC's default heap manager allocates until the OS reports that the process'
address space is exhausted which for 32-bit processes on Windows without
LargeAddressAware is at around 2 GB. After that you'll receive EOutOfMemory
exceptions.

You can however implement a heap manager that works differently.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20141031/90428198/attachment.html>


More information about the fpc-pascal mailing list