B
byang
Hi,
I am now designing a library in C, and the libary dynamically
allocate much memory, and now I use reference couting to deal with
memory alloc/free. I mean, the client of this libary should call unref
() for many pointer of the data structure of the library. And this ref/
unref interface impose more additional task for client programmers.
But I am wondering is there a better way? So, I goole for "gc for C",
and got a mark-sweep collector (http://www.hpl.hp.com/personal/
Hans_Boehm/gc/). Could anybody here please give me some advice on GC
of the library? Thanks a lot!
Regards!
Bo
I am now designing a library in C, and the libary dynamically
allocate much memory, and now I use reference couting to deal with
memory alloc/free. I mean, the client of this libary should call unref
() for many pointer of the data structure of the library. And this ref/
unref interface impose more additional task for client programmers.
But I am wondering is there a better way? So, I goole for "gc for C",
and got a mark-sweep collector (http://www.hpl.hp.com/personal/
Hans_Boehm/gc/). Could anybody here please give me some advice on GC
of the library? Thanks a lot!
Regards!
Bo