[gnu.g++.lib.bug] libg++ problem with memory management for regexp's

tietz@gmdzi.UUCP (Christoph Tietz) (12/11/89)

The regular expression code in String.cc leads to a serious problem:

In Regex::initialize a buffer is allocated via a call to new and the
following call to re_compile_pattern may call realloc (EXTEND_BUFFER) on this
buffer. This leads to problems if new is not a simple call to malloc.  We
reimplemented new to speed up operations on objects of the generic vector
classes and use a very simple and efficient scheme for the allocation of
small chunks of memory out of a internally managed pool. We achieved a
speedup of about 2 this way and don't want to lose it because we use regular
expressions.

Question: Is there a simple way to clean up the memory management?
	  Would it be feasible to use malloc instead of new in String.cc ?

Thank you for your help
                                   Christoph Tietz
-- 
GMD,  Schloss Birlinghoven,  Postfach 1240,  D-5205 St. Augustin 1,  FRG

e-mail:  tietz@zi.gmd.dbp.de                tietz@gmdzi.uucp
         tietz%zi.gmd.dbp.de@relay.cs.net   ... !uunet!unido!gmdzi!tietz