diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2012-01-26 09:03:08 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2012-01-26 09:03:08 +0000 |
| commit | a2414bc6258566d07260e393c6966b07f3341744 (patch) | |
| tree | a669f7aeedcd6328788b39cacd88212c94f0d04c /src/runtime | |
| parent | 8256750599784a84f7f905f31ac1cd174dce544e (diff) | |
libpgf: use a temporal pool for allocating the arrays in the continuation map of the parser
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/c/pgf/parser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/c/pgf/parser.c b/src/runtime/c/pgf/parser.c index 649e8785e..1df483e97 100644 --- a/src/runtime/c/pgf/parser.c +++ b/src/runtime/c/pgf/parser.c @@ -79,6 +79,7 @@ typedef struct PgfParsing PgfParsing; struct PgfParsing { PgfParse* parse; GuPool* pool; + GuPool* tmp_pool; PgfContsMap* conts_map; PgfGenCatMap* generated_cats; }; @@ -211,7 +212,7 @@ pgf_parsing_get_contss(PgfParsing* parsing, PgfCCat* cat) PgfItemBufs* contss = gu_map_get(parsing->conts_map, cat, PgfItemBufs*); if (!contss) { size_t n_lins = cat->cnccat->n_lins; - contss = gu_new_list(PgfItemBufs, parsing->pool, n_lins); + contss = gu_new_list(PgfItemBufs, parsing->tmp_pool, n_lins); for (size_t i = 0; i < n_lins; i++) { gu_list_index(contss, i) = NULL; } @@ -678,6 +679,7 @@ pgf_new_parsing(PgfParse* parse, GuPool* parse_pool, GuPool* out_pool) parsing->generated_cats = gu_map_type_new(PgfGenCatMap, out_pool); parsing->conts_map = gu_map_type_new(PgfContsMap, out_pool); parsing->pool = parse_pool; + parsing->tmp_pool = out_pool; return parsing; } |
