Commit bc10d36c authored by Kevin Modzelewski's avatar Kevin Modzelewski Committed by Kevin Modzelewski

ulimit: change from RSS to virtual size

For some reason the max-RSS limit doesn't seem to be kicking in.
Switch to putting a limit on the virtual size instead, and bump the
limit from 500MB to 1.5GB.
parent 4a8040cf
......@@ -31,8 +31,8 @@ GTEST_DIR := $(DEPS_DIR)/gtest-1.7.0
USE_DEBUG_LIBUNWIND := 0
MAX_MEM_KB := 500000
MAX_DBG_MEM_KB := 500000
MAX_MEM_KB := 1500000
MAX_DBG_MEM_KB := 1500000
TEST_THREADS := 1
......@@ -411,10 +411,10 @@ $1_unittest:
$(NINJA) -C $(CMAKE_DIR_DBG) $1_unittest $(NINJAFLAGS)
ln -sf $(CMAKE_DIR_DBG)/$1_unittest .
dbg_$1_unittests: $1_unittest
zsh -c 'ulimit -m $(MAX_MEM_KB); time $(GDB) $(GDB_CMDS) --args ./$1_unittest --gtest_break_on_failure $(ARGS)'
zsh -c 'ulimit -v $(MAX_MEM_KB); time $(GDB) $(GDB_CMDS) --args ./$1_unittest --gtest_break_on_failure $(ARGS)'
unittests:: $1_unittest
run_$1_unittests: $1_unittest
zsh -c 'ulimit -m $(MAX_MEM_KB); time ./$1_unittest $(ARGS)'
zsh -c 'ulimit -v $(MAX_MEM_KB); time ./$1_unittest $(ARGS)'
run_unittests:: run_$1_unittests
)
endef
......@@ -770,12 +770,12 @@ check$1 test$1: $(PYTHON_EXE_DEPS) pyston$1
run$1: pyston$1 $$(RUN_DEPS)
PYTHONPATH=test/test_extension:$${PYTHONPATH} ./pyston$1 $$(ARGS)
dbg$1: pyston$1 $$(RUN_DEPS)
PYTHONPATH=test/test_extension:$${PYTHONPATH} zsh -c 'ulimit -m $$(MAX_DBG_MEM_KB); $$(GDB) $$(GDB_CMDS) --args ./pyston$1 $$(ARGS)'
PYTHONPATH=test/test_extension:$${PYTHONPATH} zsh -c 'ulimit -v $$(MAX_DBG_MEM_KB); $$(GDB) $$(GDB_CMDS) --args ./pyston$1 $$(ARGS)'
nosearch_run$1_%: %.py pyston$1 $$(RUN_DEPS)
$(VERB) PYTHONPATH=test/test_extension:$${PYTHONPATH} zsh -c 'ulimit -m $$(MAX_MEM_KB); time ./pyston$1 $$(ARGS) $$<'
$(VERB) PYTHONPATH=test/test_extension:$${PYTHONPATH} zsh -c 'ulimit -v $$(MAX_MEM_KB); time ./pyston$1 $$(ARGS) $$<'
$$(call make_search,run$1_%)
nosearch_dbg$1_%: %.py pyston$1 $$(RUN_DEPS)
$(VERB) PYTHONPATH=test/test_extension:$${PYTHONPATH} zsh -c 'ulimit -m $$(MAX_DBG_MEM_KB); $$(GDB) $$(GDB_CMDS) --args ./pyston$1 $$(ARGS) $$<'
$(VERB) PYTHONPATH=test/test_extension:$${PYTHONPATH} zsh -c 'ulimit -v $$(MAX_DBG_MEM_KB); $$(GDB) $$(GDB_CMDS) --args ./pyston$1 $$(ARGS) $$<'
$$(call make_search,dbg$1_%)
ifneq ($$(ENABLE_VALGRIND),0)
......@@ -905,7 +905,7 @@ opreportcg:
.PHONY: watch_% watch wdbg_%
watch_%:
@ ( ulimit -t 60; ulimit -m $(MAK_MEM_KB); \
@ ( ulimit -t 60; ulimit -v $(MAK_MEM_KB); \
TARGET=$(dir $@)$(patsubst watch_%,%,$(notdir $@)); \
clear; $(MAKE) $$TARGET $(WATCH_ARGS); true; \
while inotifywait -q -e modify -e attrib -e move -e move_self -e create -e delete -e delete_self \
......@@ -953,7 +953,7 @@ test_cpp_ll:
.PHONY: bench_exceptions
bench_exceptions:
$(CLANGPP_EXE) $(TEST_DIR)/bench_exceptions.cpp -o bench_exceptions -O3 -std=c++11
zsh -c 'ulimit -m $(MAX_MEM_KB); time ./bench_exceptions'
zsh -c 'ulimit -v $(MAX_MEM_KB); time ./bench_exceptions'
rm bench_exceptions
TEST_EXT_MODULE_NAMES := basic_test descr_test slots_test type_test api_test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment