looking for a quick&dirty fix to remove memory leaks in freepascal
From: Falcon (noone_at_hotmail.com)
Date: 11/17/03
- Next message: Chris Dollin: "Re: Programming Language Productivity: The Stupidity of Programmers"
- Previous message: Tyler: "Ada95 =>ciphertext only attack=>pattern matching...help!!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 17 Nov 2003 12:50:10 +0100
Hi all,
I have made an application in freepascal (www.freepascal.org), which
uses the fgint.pas (http://triade.studentenweb.org/) for big integer
support. My problem is this: I use some iterative functions that
suffer from memory leaks. And fixing memory leaks when using fgint
functions is next to impossible because almost all internal functions
dynamically reserve/resize heap memory.
The weird thing is this: when I use Delphi 6, delphi cleans up the
heap after the function quits. So my question is this: Is there a
quick&dirty or standard method to clean op the mess a function creates
by allocating a lot of memory using getmem in freepascal. So it only
leaks when the actual function is in use. (all leaks are in local
var's)
If the heap is a linear growing chuck of memory, I think it could be
as easy as resetting the heap pointer to it's starting location. Or
maybe the os can be forced to release all allocated memory from a
specific point.
I'm really at loss here, so any help will be much appreciated.
- Next message: Chris Dollin: "Re: Programming Language Productivity: The Stupidity of Programmers"
- Previous message: Tyler: "Ada95 =>ciphertext only attack=>pattern matching...help!!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|