Ignore:
Timestamp:
Jul 31, 2009, 3:29:11 PM (16 years ago)
Author:
[email protected]
Message:

2009-07-31 Zoltan Horvath <[email protected]>

Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
https://bugs.webkit.org/show_bug.cgi?id=27874

Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods.

  • yarr/RegexInterpreter.cpp: (JSC::Yarr::Interpreter::allocDisjunctionContext): (JSC::Yarr::Interpreter::freeDisjunctionContext): (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/yarr/RegexInterpreter.cpp

    r44174 r46643  
    105105    DisjunctionContext* allocDisjunctionContext(ByteDisjunction* disjunction)
    106106    {
    107         return new(malloc(sizeof(DisjunctionContext) + (disjunction->m_frameSize - 1) * sizeof(uintptr_t))) DisjunctionContext();
     107        return new(fastMalloc(sizeof(DisjunctionContext) + (disjunction->m_frameSize - 1) * sizeof(uintptr_t))) DisjunctionContext();
    108108    }
    109109
    110110    void freeDisjunctionContext(DisjunctionContext* context)
    111111    {
    112         free(context);
     112        fastFree(context);
    113113    }
    114114
     
    151151    ParenthesesDisjunctionContext* allocParenthesesDisjunctionContext(ByteDisjunction* disjunction, int* output, ByteTerm& term)
    152152    {
    153         return new(malloc(sizeof(ParenthesesDisjunctionContext) + (((term.atom.parenthesesDisjunction->m_numSubpatterns << 1) - 1) * sizeof(int)) + sizeof(DisjunctionContext) + (disjunction->m_frameSize - 1) * sizeof(uintptr_t))) ParenthesesDisjunctionContext(output, term);
     153        return new(fastMalloc(sizeof(ParenthesesDisjunctionContext) + (((term.atom.parenthesesDisjunction->m_numSubpatterns << 1) - 1) * sizeof(int)) + sizeof(DisjunctionContext) + (disjunction->m_frameSize - 1) * sizeof(uintptr_t))) ParenthesesDisjunctionContext(output, term);
    154154    }
    155155
    156156    void freeParenthesesDisjunctionContext(ParenthesesDisjunctionContext* context)
    157157    {
    158         free(context);
     158        fastFree(context);
    159159    }
    160160
Note: See TracChangeset for help on using the changeset viewer.