From 244190d134da89a5f86fc77a07cb897eb1abb612 Mon Sep 17 00:00:00 2001 From: felix Date: Thu, 6 Dec 2018 16:05:46 +0100 Subject: [PATCH 1/2] Drop ancient "stress test" feature. This was once used to force minor GCs randomly. --- chicken.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/chicken.h b/chicken.h index 598a3cff..2d47f542 100644 --- a/chicken.h +++ b/chicken.h @@ -1076,13 +1076,6 @@ typedef void (C_ccall *C_proc)(C_word, C_word *) C_noret; #define C_isinf(f) isinf(f) #define C_isfinite(f) isfinite(f) -#ifdef C_STRESS_TEST -# define C_STRESS_FAILURE 3 -# define C_stress (rand() % C_STRESS_FAILURE) -#else -# define C_stress 1 -#endif - #define C_stack_overflow_check C_stack_check1(C_stack_overflow(NULL)) /* TODO: The C_scratch_usage checks should probably be moved. Maybe @@ -1092,7 +1085,7 @@ typedef void (C_ccall *C_proc)(C_word, C_word *) C_noret; * "end" of a C function. */ #if C_STACK_GROWS_DOWNWARD -# define C_demand(n) (C_stress && ((C_word)(C_stack_pointer - C_stack_limit) > ((n)+C_scratch_usage))) +# define C_demand(n) ((C_word)(C_stack_pointer - C_stack_limit) > ((n)+C_scratch_usage)) # define C_stack_check1(err) if(!C_disable_overflow_check) { \ do { C_byte *_sp = (C_byte*)(C_stack_pointer); \ if(_sp < (C_byte *)C_stack_hard_limit && \ @@ -1101,7 +1094,7 @@ typedef void (C_ccall *C_proc)(C_word, C_word *) C_noret; while(0);} #else -# define C_demand(n) (C_stress && ((C_word)(C_stack_limit - C_stack_pointer) > ((n)+C_scratch_usage))) +# define C_demand(n) ((C_word)(C_stack_limit - C_stack_pointer) > ((n)+C_scratch_usage)) # define C_stack_check1(err) if(!C_disable_overflow_check) { \ do { C_byte *_sp = (C_byte*)(C_stack_pointer); \ if(_sp > (C_byte *)C_stack_hard_limit && \ -- 2.16.2