From a283adae755aa8617119afb283b9b874f64cf911 Mon Sep 17 00:00:00 2001 From: Paul Baltescu Date: Wed, 6 Mar 2013 11:43:16 +0000 Subject: Fix memory leak in trie. --- python/pkg/cdec/sa/compile.py | 11 ----------- python/src/sa/_sa.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) (limited to 'python') diff --git a/python/pkg/cdec/sa/compile.py b/python/pkg/cdec/sa/compile.py index 1362e7b5..d4cd8387 100644 --- a/python/pkg/cdec/sa/compile.py +++ b/python/pkg/cdec/sa/compile.py @@ -21,10 +21,6 @@ def precompute(f_sa, max_len, max_nt, max_size, min_gap, rank1, rank2, tight_phr train_min_gap_size=min_gap) return precomp -def my_pause(): - for i in range(10000000): - print >> sys.stderr, "" - def main(): preprocess_start_time = monitor_cpu() sys.setrecursionlimit(sys.getrecursionlimit() * 100) @@ -89,8 +85,6 @@ def main(): stop_time = monitor_cpu() logger.info('Compiling source suffix array took %f seconds', stop_time - start_time) - my_pause() - start_time = monitor_cpu() logger.info('Compiling target data array') if args.bitext: @@ -100,7 +94,6 @@ def main(): e.write_binary(e_bin) stop_time = monitor_cpu() logger.info('Compiling target data array took %f seconds', stop_time - start_time) - my_pause() start_time = monitor_cpu() logger.info('Precomputing frequent phrases') @@ -108,15 +101,12 @@ def main(): stop_time = monitor_cpu() logger.info('Compiling precomputations took %f seconds', stop_time - start_time) - my_pause() - start_time = monitor_cpu() logger.info('Compiling alignment') a = cdec.sa.Alignment(from_text=args.alignment) a.write_binary(a_bin) stop_time = monitor_cpu() logger.info('Compiling alignment took %f seonds', stop_time - start_time) - my_pause() start_time = monitor_cpu() logger.info('Compiling bilexical dictionary') @@ -124,7 +114,6 @@ def main(): lex.write_binary(lex_bin) stop_time = monitor_cpu() logger.info('Compiling bilexical dictionary took %f seconds', stop_time - start_time) - my_pause() # Write configuration config = cdec.configobj.ConfigObj(args.config, unrepr=True) diff --git a/python/src/sa/_sa.c b/python/src/sa/_sa.c index 92abd4c3..4bdabc17 100644 --- a/python/src/sa/_sa.c +++ b/python/src/sa/_sa.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.16 on Fri Feb 22 16:52:09 2013 */ +/* Generated by Cython 0.16 on Wed Mar 6 11:06:18 2013 */ #define PY_SSIZE_T_CLEAN #include "Python.h" -- cgit v1.2.3