[fpc-pascal] FPC Heap Management : sub-allocation ?
Frederic Da Vitoria
davitofrg at gmail.com
Fri Oct 31 16:43:44 CET 2014
2014-10-31 16:33 GMT+01:00 Michael Van Canneyt <michael at freepascal.org>:
>
>
> On Fri, 31 Oct 2014, Brian wrote:
>
> Thanks Sven.
>>
>> Do you know how it behaves when running under Linux?
>>
>
> What do you mean with this question ?
>
> Large memory blocks are allocated directly from the OS.
> For small memory blocks, pools are allocated from the OS, and the small
> memory blocks are then taken from the pool.
>
I think that Brian is asking if a memory leak could eat the system's memory
irreversibly. IIUC in Windows, when the program is stopped, all it's memory
is freed, even if the program leaked memory. I don't know about Linux, but
I'd be surprised if it weren't the same.
This does not mean the OS will not be almost as bad as crashed: if your
program leaks too much, you may trigger so much thrashing that your system
will become unusable. This did happen quite frequently to me with Windows
XP 32 bits. I now use Windows 7 64 bits, and it hasn't happened to me
since, but I guess that's only because I haven't tried hard enough :-)
--
Frederic Da Vitoria
(davitof)
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20141031/7492c891/attachment.html>
More information about the fpc-pascal
mailing list