[glib] malloc and bdwgc



I'm using glib without the whole GObject system and reference counting
mechanism, and I'd like to integrate bdwgc
(https://github.com/ivmai/bdwgc/) because of the complexity of my
program.

I've read about using GMemVTable to redirect memory allocation of glib
to GC_malloc, however as in
https://mail.gnome.org/archives/commits-list/2015-July/msg05892.html ,
such mechanism no longer works, and even more unfortunately it says
glib allocates memory before main() so it seems that I'm even unable
to hook to malloc in time as in
http://www.gnu.org/software/libc/manual/html_node/Hooks-for-Malloc.html
.

Can I use bdwgc with glib >= 2.4.6? If so, how can I achieve that correctly?


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