diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-05-06 15:28:04 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-05-06 15:28:04 +0000 |
| commit | 7ba27229b314057104aeab8f46a7247fbb20352e (patch) | |
| tree | c140ce18b07b86c85aa49e937b3890c2a9361e70 /src/runtime/c/pgf/literals.c | |
| parent | 520c2fb59d3d386a6ad468ea6bc6768c42e39a2d (diff) | |
the statistical parser is now using two memory pools: one for parsing and one for the output trees. This means that the memory for parsing can be released as soon as the needed abstract trees are retrieved, while the trees themselves are retained in the separate output pool
Diffstat (limited to 'src/runtime/c/pgf/literals.c')
| -rw-r--r-- | src/runtime/c/pgf/literals.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/c/pgf/literals.c b/src/runtime/c/pgf/literals.c index e6c9a9ed3..e1c9ad880 100644 --- a/src/runtime/c/pgf/literals.c +++ b/src/runtime/c/pgf/literals.c @@ -176,13 +176,14 @@ static bool pgf_match_name_lit(PgfConcr* concr, PgfItem* item, PgfToken tok, PgfExprProb** out_ep, GuPool *pool) { + GuPool* tmp_pool = gu_new_pool(); + size_t lin_idx; PgfSequence seq; - pgf_item_sequence(item, &lin_idx, &seq, pool); + pgf_item_sequence(item, &lin_idx, &seq, tmp_pool); gu_assert(lin_idx == 0); - GuPool* tmp_pool = gu_new_pool(); GuExn* err = gu_new_exn(NULL, gu_kind(type), tmp_pool); GuString hyp = gu_str_string("-", tmp_pool); |
