Bug 16187 - MatchStack should allocate frames in chunks and only free them in ~MatchStack
Summary: MatchStack should allocate frames in chunks and only free them in ~MatchStack
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 16186
  Show dependency treegraph
 
Reported: 2007-11-29 04:17 PST by Eric Seidel (no email)
Modified: 2011-09-06 22:33 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-11-29 04:17:49 PST
MatchStack should allocate frames in chunks and only free them in ~MatchStack

Currently MatchStack will allocate a new frame each time you recurse once you've gone past FRAMES_ON_STACK frames.

Instead, MatchStack should allocate frames in chunks (to avoid individual mallocs) and hold onto those chunks until ~MatchStack() is called.

This would be a win for any regexp which uses more than FRAMES_ON_STACK frames in more than one place in the regexp.
Comment 1 Gavin Barraclough 2011-09-06 22:33:20 PDT
This is a proposed optimization for PCRE; we no longer use PCRE.