[Aldor-l] Code audit
David Casperson
casper at unbc.ca
Wed Jul 2 20:19:17 EDT 2008
Pippijn, you wrote:
> On Mon, Jun 30, 2008 at 10:47:51AM -0700, David Casperson wrote:
> > buffer points at, just the buffer itself. This matches
> > bufCapture, which does not copy the ``String s'', just makes a
> > buffer that points at it.
> >
> > Does this seem right?
>
> It seems right, but in some cases (dgCycleError, dgOrderError), the
> buffer is created with bufNew, not bufCapture. Your explanation of
> "memory leak is okay on error paths" is not really what I'm looking for.
> As I explained on my website, the Aldor GC performs best if memory is
> manually returned to the allocator. Am I missing anything here? Is
> bufLiberate really the right thing even in these functions?
The code in dgCycleError and dgOrderError looks erroneous to me,
as it appears to not free the string contents of the buffer.
Stephen, Laurentiu ?
David
--
Dr. David Casperson, Assistant Professor | casper at unbc.ca
Department of Computer Science | (250) 960-6672 Fax 960-5544
College of Science and Management | 3333 University Way
University of Northern British Columbia | Prince George, BC V2N 4Z9
| CANADA
More information about the Aldor-l
mailing list