]> git.localhorst.tv Git - l2e.git/blobdiff - src/loader/Interpreter.h
better allocation in interpreter
[l2e.git] / src / loader / Interpreter.h
index 9e90bcc4e98fd51d9f7b05594308b689a6df3d01..15cebd5e2ff3f10e2adb57a48418c4efb1d1edf5 100644 (file)
@@ -9,6 +9,7 @@
 #define LOADER_INTERPRETER_H_
 
 #include "fwd.h"
+#include "PagedAllocator.h"
 #include "ParsedSource.h"
 #include "TypeDescription.h"
 #include "../battle/fwd.h"
@@ -36,7 +37,7 @@ public:
        };
 
 public:
-       explicit Interpreter(const ParsedSource &source) : source(source) { }
+       explicit Interpreter(const ParsedSource &source) : source(source), alloc(4096) { }
        ~Interpreter();
 private:
        Interpreter(const Interpreter &);
@@ -88,6 +89,8 @@ private:
 private:
        const ParsedSource &source;
 
+       PagedAllocator alloc;
+
        std::map<std::string, ParsedDefinition> parsedDefinitions;
        std::vector<PostponedDefinition> postponedDefinitions;
        std::map<std::string, SDL_Surface *> imageCache;