This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: More demangler patches, with fixes for gcc/13244 and gcc/13304


DJ Delorie <dj@redhat.com> writes:

> > Tom Tromey indicated that there might be some use for the new
> > demangler somewhere in the Java libraries, where they need a demangler
> > which doesn't call libstdc++ routines.
> 
> We'd probably need to be able to hook the allocators too, in case java
> needs to do its own malloc/free stuff.

Easy to do.  The code does very little memory allocation.  It could
actually use alloca for everything but the buffer which it returns,
although of course alloca raises its own issues.  The interface
defines the return buffer as being allocated by malloc, but it would
be easy to change the code to support passing in a buffer and a size.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]