really freeing the memory allocated by g_slist

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

 



Hi all.Â

I use a library called GTS for computational geometry tasks, and it is heavily based on GLib data structures. Specifically, in _many_ occasions it returns a GSList* containing vertices, edges and so on, which you use and then delete with g_slist_free( ). In my work, during a transient simulation this kind of operation occurs at least tens of millions of times. Since g_slist_free( ) does not actually deallocates the memory used by the list, my program always ends consuming all available memory during the simulation (8 GB, when it should use just 10% of that).ÂI read in some mailing list that setting the G_SLICE environment variable to always-malloc should work, but it didn't change anything.ÂHow can I solve this problem?Â

PS: To setup G_SLICE I just defined it in my .bashrc file, like this:
G_SLICE=always-malloc; export G_SLICE;
Is it just it?

Thanks in advance

MÃrcio
--
MÃrcio Ricardo Pivello
Universidade Federal de UberlÃndia
Faculdade de Engenharia MecÃnica
LaboratÃrio de MecÃnica dos Fluidos
+55 (34) 3239 4040 ramal 618
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux