🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10608

Re: VM Size is not reduced

#10608
From: Andrue Cope
Date: Wed, 31 Mar 2004 08:28
29 lines
2168 bytes
On Wed, 31 Mar 2004 09:36:17 +0700, Sara T. wrote:

> My software calls simple API i.e. malloc() and free() to allocate and free
> the memory, otherwise I use simple component such as ListBox

Why use malloc()/free()? I doubt it's the cause of the problem but I
thought they were actually deprecated in favour of new/delete? The latter
are certainly easier to use and if you're using objects they are essential.

Your first step should be to use a memory validator such as Code Guard to
confirm that you aren't leaking memory (IOW every call to malloc() as a
matching call to free().

If you know you aren't leaking memory then are you doing a lot of
allocations mixing small/large blocks?

That kind of allocation style seems to prevent the Borland Heap Manager
from tracking free space in the heap. My current theory is that the HM has
a limit on the number of free blocks it will track and eventually it starts
to forget older blocks.

In /theory/ you shouldn't actually need to worry about increasing VM size.
It will eventually be released when your application exits and on most
systems there's plenty of disk space for the page file to grow into but I
don't like seeing it either :)

--
Andrue Cope
[Bicester UK]
Technical Details
Message-ID: <wqvuvtc9ju5j.103w64ropni1s.dlg@40tude.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <406a2eaa@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,47b4c8bfa962b00d
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-31 00:39:39 PST
From: Andrue Cope <no.spam@spammy.com>
Subject: Re: VM Size is not reduced
Newsgroups: borland.public.cppbuilder.nativeapi
User-Agent: 40tude_Dialog/2.0.10.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <406a2eaa@newsgroups.borland.com>
Date: Wed, 31 Mar 2004 09:28:12 +0100
Message-ID: <wqvuvtc9ju5j.103w64ropni1s.dlg@40tude.net>
NNTP-Posting-Host: 217.207.223.34
X-Trace: newsgroups.borland.com 1080721737 217.207.223.34 (31 Mar 2004 00:28:57 -0800)
Lines: 29
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail