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/pgf.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/pgf.c')
| -rw-r--r-- | src/runtime/c/pgf/pgf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/c/pgf/pgf.c b/src/runtime/c/pgf/pgf.c index 24d330981..b355593d8 100644 --- a/src/runtime/c/pgf/pgf.c +++ b/src/runtime/c/pgf/pgf.c @@ -207,7 +207,8 @@ pgf_linearize(PgfConcr* concr, PgfExpr expr, GuWriter* wtr, GuExn* err) } GuEnum* -pgf_parse(PgfConcr* concr, PgfCId cat, PgfLexer *lexer, GuPool* pool) +pgf_parse(PgfConcr* concr, PgfCId cat, PgfLexer *lexer, + GuPool* pool, GuPool* out_pool) { // Begin parsing a sentence of the specified category PgfParseState* state = @@ -233,7 +234,7 @@ pgf_parse(PgfConcr* concr, PgfCId cat, PgfLexer *lexer, GuPool* pool) return NULL; // Now begin enumerating the resulting syntax trees - return pgf_parse_result(state, pool); + return pgf_parse_result(state, out_pool); } GuEnum* |
