From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: How can I know free memory in bytes? Date: 31 May 2000 10:54:26 GMT Organization: Aachen University of Technology (RWTH) Lines: 25 Message-ID: <8h2r12$hvo$1@nets3.rz.RWTH-Aachen.DE> References: <3934AFC1 DOT 68C3AF39 AT htsol DOT com> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 959770466 18424 137.226.32.75 (31 May 2000 10:54:26 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 31 May 2000 10:54:26 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Yoram Hofman wrote: > This is a multi-part message in MIME format. > --------------7D437EF5E127A1E7CBE84306 > Content-Type: text/plain; charset=us-ascii > Content-Transfer-Encoding: 7bit [could you please turn that silly 'vcard' stuff off? It's a waste of bandwidth] > So I am wonder to know about memory leaks. I am interested in a more > detailed information that the function __dpmi_get_free_memory() can > give. Actually, dpmi_get_free_memory will give you almost no useful information about the memory really in use by your program. You may notice that you have a major leak if it keeps decreasing all the time (i.e. your program grows without bounds), but that's not always a precise diagnosis (heap fragmentation can lead to similar behaviour). I suggest you try a malloc() checker like 'CSS' (sp?) or Nate Eldredge's neat YAMD. Among other misuses of allocated storage, they'll point out any memory leaked by your program. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.