Ignore:
Timestamp:
May 24, 2017, 12:06:43 PM (2 years ago)
Author:
nmedfort
Message:

Eliminated ExecutionEngine? memory leak. Intentionally broke compatibility with prior versions to ensure unchecked in projects are restructured.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/preprocess.cpp

    r5461 r5474  
    7272
    7373    pxDriver.LinkFunction(*scanMatchK, "wrapped_report_pos", &wrapped_report_pos);
    74     pxDriver.linkAndFinalize();
     74    pxDriver.finalizeObject();
    7575
    7676}
     
    7878typedef void (*preprocessFunctionType)(char * byte_data, size_t filesize);
    7979
    80 preprocessFunctionType preprocessCodeGen() {
    81                            
     80std::vector<size_t> preprocess(char * fileBuffer, size_t fileSize) {
    8281    ParabixDriver pxDriver("preprocess");
    83 
    8482    preprocessPipeline(pxDriver);
    85    
    86     preprocessFunctionType main = reinterpret_cast<preprocessFunctionType>(pxDriver.getPointerToMain());
    87 
    88     return main;
    89 }
    90 
    91 std::vector<size_t> preprocess(char * fileBuffer, size_t fileSize) {
    92     preprocessFunctionType preprocess_ptr = preprocessCodeGen();
    93     preprocess_ptr(fileBuffer, fileSize);
     83    auto main = reinterpret_cast<preprocessFunctionType>(pxDriver.getPointerToMain());
     84    main(fileBuffer, fileSize);
    9485    return LFPositions;
    9586}
Note: See TracChangeset for help on using the changeset viewer.