GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #1027

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: Jan-Jaap van der Heijden
Subject: Allocation/Memory Leak question
Date: 29 Jul 1997, 01:29:18

On Mon, 28 Jul 1997, Ken Linder (KC7RAD) wrote:


> >Simply because one `Real' has eight bytes, and you are allocating one
> >million of `Real's.  8000000 bytes are 7812.5kB; if you include code,
> >runtime library, etc., 8094kB seems realistic for me.
> >
> It must be something associated with Linux.  I also thought the allocation
> of memory should take place when the array is referenced.  I stopped the
> program with a readln after the first FOR loop and sure enough, ~8108M was
> allocated (as seen from top).

The memory shows as allocated from top, but no physical allocation
or paging occurs untill it's actually referenced. This is to prevent that
more memory is allocated by all processes than the total amount of VM.

I know the java runtime allocates > 20M when initializing, but you don't
notice anything untill it actually requires this amount of memory...

JJ

---
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead.  -- RFC1925.

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


In reply to

Author Subject Date
Ken Linder Allocation/Memory Leak question 28 Jul 1997, 08:25:01

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).