Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!unido!gmdzi!tietz From: tietz@gmdzi.UUCP (Christoph Tietz) Newsgroups: gnu.g++.lib.bug Subject: libg++ problem with memory management for regexp's Keywords: regexp, libg++ Message-ID: <1754@gmdzi.UUCP> Date: 11 Dec 89 15:10:19 GMT Distribution: gnu Organization: GMD, Sankt Augustin, F. R. Germany Lines: 22 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