Re: [glib] malloc and bdwgc

Emm... what do you mean by "setup your GC"? My GC is done in another shared lib, and I want to make the malloc of all other components GC_malloc except for How should I accomplish this?

By searching on GitHub, I also found no reference in Mono code to GMemVTable. Do you now how they dealt with this?

Christian Hergert <christian hergert me>于2016年1月12日周二 下午4:44写道:
On 01/11/2016 11:53 PM, Thomas Martitz wrote:
> Yes, but the point of my previous email is that the third-party
> GC_malloc() might eventually call malloc() itself, and by defining a
> malloc() in my program, GC_malloc() will again call into my malloc() and
> then GC_malloc() until stack overflow. Do you think this will happen?

You can write your application in a shared library and then make your
primary executable an application loader. dlopen() after you've setup
your GC.

Some commercial products did something similar to this to deal with
bundled vs. user supplied gtk+ as well as glibc band-aids, etc.

As for mono, it doesn't use GMemVTable.

-- Christian
gtk-devel-list mailing list
gtk-devel-list gnome org
浙江大学 计算机科学与技术

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