But the facility of obstacks is in glibc for 10 years now. This means,
it will get hard for you to convince the glibc maintainers.
I have improved my patch and sent it to libc-alpha. Let's wait the
result. Thank you.
> The third one requires more libraries to be linked with and I do not
want.
libtrampoline is tiny: less than 1 KB object code.
OK. Will take a look :) Thanks.
> However, there are other cases where there is no solutions, or the
> solutions are tricky. For example, if two obstacks are in two
> different type of objects which react differently to memory allocation
> failure, using a global `obstack_alloc_failed_handler' is a bad idea.
You can also put the memory allocation failure check into the memory
allocation function. You can specify this function through
'obstack_chunkfun'
for each obstack separately.
Well, this defeats the existence of obstack_alloc_failed_handler, and
since functions cannot save per-object status, it cannot decide jump
destinations according to one of many objects too.
Regards,
Guanpeng Xu
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/