From 7ba27229b314057104aeab8f46a7247fbb20352e Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Mon, 6 May 2013 15:28:04 +0000 Subject: 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 --- src/runtime/c/pgf/literals.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/runtime/c/pgf/literals.c') 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); -- cgit v1.2.3