Ignore:
Timestamp:
Oct 28, 2014, 12:17:38 PM (5 years ago)
Author:
nmedfort
Message:

Implemented slab allocator based on the original Parabix StringPool?; intergrated it with RE and Pablo AST nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pabloAST.h

    r4270 r4272  
    99
    1010#include <llvm/Support/Casting.h>
     11#include <slab_allocator.h>
    1112#include <vector>
    1213
     
    1920class PabloAST {
    2021public:
     22    typedef SlabAllocator<1024> Allocator;
    2123    enum class ClassTypeId : unsigned {
    2224        Advance
     
    4143        return mClassTypeId;
    4244    }
     45    inline static void release_memory() {
     46        mAllocator.release_memory();
     47    }
    4348protected:
    4449    inline PabloAST(const ClassTypeId id)
     
    4752
    4853    }
     54    static Allocator mAllocator;
    4955private:
    5056    const ClassTypeId   mClassTypeId;
Note: See TracChangeset for help on using the changeset viewer.