comp.lang.ada
 help / color / mirror / Atom feed
From: randhol+abuse@pvv.org (Preben Randhol)
Subject: Problems freeing memory with Free
Date: Sun, 29 Apr 2001 20:29:45 +0000 (UTC)
Date: 2001-04-29T20:29:45+00:00	[thread overview]
Message-ID: <slrn9eouh2.23n.randhol+abuse@kiuk0156.chembio.ntnu.no> (raw)

Hi

I need some help because now I have been looking at this problem for 3
days and I cannot find the solution.

I have made a double linked list which seems to preform correctly using
a debugger. The problem however is that if I delete all the Nodes except
the last and at the same time look at the programs memory usage with
"top" under Linux, it reports the same amount of memory all the time. If
it then delete the last node too, the memory suddenly drops down to the
expected value (that is same as before the nodes were made). 

If I also delete all the nodes starting from the second node until the
last, but not the first, the memory drops. I cannot figure out the
error, so if somebody could be so kind to look at it and help me spot
the error I would be very glad. I'm probably blind to the error after
staring at the source for so long.

The source can be downloaded and viewed here:

   http://www.pvv.org/~randhol/Ada95/Double/

Thanks in advance!

PS: The list is for an educational program I'm making and will release
under GPL as soon as I can get the list to work properly...

-- 
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
                 �For me, Ada95 puts back the joy in programming.�



             reply	other threads:[~2001-04-29 20:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-29 20:29 Preben Randhol [this message]
2001-04-29 22:16 ` Problems freeing memory with Free Florian Weimer
2001-04-30  7:35   ` Preben Randhol
2001-04-30  8:01     ` Preben Randhol
2001-04-30 13:23     ` Larry Kilgallen
2001-05-01 12:30     ` Florian Weimer
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox