From 97c8e028b15cf8e3390dfb344ca9d3c420c9f0ae Mon Sep 17 00:00:00 2001 From: johnvg Date: Thu, 21 Nov 2002 16:15:22 +0000 Subject: give the strictness analyser more memory for large modules, move some definitions from settings.c+h to sa.c git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1288 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- backendC/CleanCompilerSources/sa.c | 15 +++++++++++---- backendC/CleanCompilerSources/settings.c | 2 -- backendC/CleanCompilerSources/settings.h | 2 -- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'backendC') diff --git a/backendC/CleanCompilerSources/sa.c b/backendC/CleanCompilerSources/sa.c index 1be3039..cf74d4a 100644 --- a/backendC/CleanCompilerSources/sa.c +++ b/backendC/CleanCompilerSources/sa.c @@ -55,6 +55,13 @@ #define for_l(v,l,n) for(v=(l);v!=NULL;v=v->n) +#define NR_BLOCKS 200 +#define NR_BLOCKS_FOR_ANALYSIS 100 + +#define BLOCK_SIZE (unsigned long) (16 * KBYTE) + +unsigned long StrictMemUse = NR_BLOCKS * BLOCK_SIZE; + #ifdef CHECK_STACK_OVERFLOW char *min_stack; int stack_source = 0; @@ -243,8 +250,8 @@ static char *ffree = Null; /* the freezed free position */ static void NewBlock (void) { if (usedblocks < n_allocated_blocks) - usedblocks ++; - else if (n_allocated_blocks < NR_BLOCKS && (BLOCK_SIZE * (n_allocated_blocks+1)) < StrictMemUse){ + ++usedblocks; + else if (n_allocated_blocks