Memory cleanup



Hi,

I have a gtk  application that serves as a GUI for a data handling
utility we use in house. It converts data format from one type to
another and in doing so it creates a huge list with all the elements,
sorts it in a specified order and spits it out to a file. The utility
runs from the command line but I addapted it to run from the GTK gui. In
short, a click on a button calls the function that runs the sorting and
stuff. I monitor the utility with top to keep an eye on memory use and
the first time the function is called it's memory usage climbs to 90
megs, which is correct considering the size of this database, however I
use the free() call to remove allocated memory at the end of the
function when control returns to gtk_main() but top still shows 90M of
ram in use by th program. Correct me if I'm wrong (and I probably am)
but shouldn't all that memory be destroyed/reclaimed/made free by the
kernel after I exit those calls? BTW, the variables are declared local
to the function not global to the program.

Thanks for any input/ideas on this.

--
Marco Quezada
Aerospaceo Engineero
NLX Corporation
22626 Sally Ride Dr.
Sterling, VA, 20164
mquezada nlxcorp com
703-234-2100 x1028
http://www.nlxcorp.com







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]