Re: [gtk-list] Re: how can I trust glib when it has so manymemleaks?
- From: Paul Bunyk <paul pbunyk physics sunysb edu>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: how can I trust glib when it has so manymemleaks?
- Date: Thu, 18 Mar 1999 11:44:02 -0500 (EST)
Ionutz Borcoman writes:
> Havoc Pennington wrote:
> >
> > No, Unix-ish systems won't let you do that. All the memory is freed by the
> > operating system when the program is terminated. However the memory is
> > never explicitly freed by the program itself, and this is what ccmalloc
> > checks.
>
> Please detail one thing here: memory is alocated by my program using
> glib. You say UNIX will free all the memory. Why isn't it freeing the
> memory allocated by glib also ? What is the use of ccmalloc if memory is
> freed by system when my program finishes ? Just to ensure that my
> program doesn't grow too much while running ?
You REALLY need to check for memory leaks in the programs which are
not expected to finish "any time soon", like an X server (which can
stay up for weeks) or some bank transaction processing environment
(which is SUPPOSED to stay up for long periods of time and you would
not want it to say "can not allocate more memory" only because you
keep forgetting free() something allocated for each processed
transaction).
Speaking about retaining allocated memory cache after program
finishes, I can IMAGINE a way to make this memory cache belong to
shared library (glib.so) instance (via shared memory
allocation/deallocation) and slices of that mapped into given process
address space whenever needed, but I doubt GLib would go that far in
augmenting/replacing UNIX VM layer. ;-)
>
> (I'm already conffused about all this stuff.)
>
> TIA,
>
> Ionutz
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
--
("`-''-/").___..--''"`-._ UNIX *is* user-friendly, he is just very
`6_ 6 ) `-. ( ).`-.__.`) picky about who his friends are...
(_Y_.)' ._ ) `._ `. ``-..-' Paul Bunyk, Research Scientist
_..`--'_..-_/ /--'_.' ,'art by (and part-time UN*X sysadm)
(il),-'' (li),' ((!.-' F. Lee http://pbunyk.physics.sunysb.edu/~paul
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]