diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-02-26 15:48:26 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-02-26 15:48:26 -0300 |
commit | cb9a3684450714945fd2d77a63d687237fdfff24 (patch) | |
tree | 8dfbe0f5cb1a5decfef059007395218e56c7bb11 /src | |
parent | 8b94f34cedb85fac0d058e7e678b623a8aac3cd8 (diff) | |
download | rneovim-cb9a3684450714945fd2d77a63d687237fdfff24.tar.gz rneovim-cb9a3684450714945fd2d77a63d687237fdfff24.tar.bz2 rneovim-cb9a3684450714945fd2d77a63d687237fdfff24.zip |
Add configuration to help debug memory leaks
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 1 | ||||
-rw-r--r-- | src/testdir/Makefile | 15 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c index c5d7d528cf..1c8f336d87 100644 --- a/src/main.c +++ b/src/main.c @@ -276,6 +276,7 @@ static char *(main_errors[]) = * (MSDOS). * Note that we may use mch_exit() before mch_init()! */ + malloc(10323); mch_init(); TIME_MSG("shell init"); diff --git a/src/testdir/Makefile b/src/testdir/Makefile index 16db2846c2..663abffff9 100644 --- a/src/testdir/Makefile +++ b/src/testdir/Makefile @@ -4,13 +4,6 @@ VIMPROG = ../../build/bin/nvim -# Uncomment this line to use valgrind for memory leaks and extra warnings. -# The output goes into a file "valgrind.testN" -# Vim should be compiled with EXITFREE to avoid false warnings. -# This will make testing about 10 times as slow. -# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --log-file=valgrind.$* - - SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \ test7.out test8.out test9.out test10.out test11.out \ test12.out test13.out test14.out test15.out test17.out \ @@ -34,6 +27,14 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \ SCRIPTS_GUI = test16.out +ifdef VALGRIND_CHECK +VALGRIND := valgrind --leak-check=yes --error-exitcode=1 --log-file=valgrind.$* +endif + +ifdef TESTNUM +SCRIPTS = test$(TESTNUM).out +endif + .SUFFIXES: .in .out nongui: nolog $(SCRIPTS) report |