Thread View: gnu.g++.lib.bug
1 messages
1 total messages
Started by Christoph Tietz
Mon, 11 Dec 1989 15:10
libg++ problem with memory management for regexp's
Author: Christoph Tietz
Date: Mon, 11 Dec 1989 15:10
Date: Mon, 11 Dec 1989 15:10
22 lines
1452 bytes
1452 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads