From 4f614d5fb6b6e8060910f3d5db1e6d5e8611cffa Mon Sep 17 00:00:00 2001 From: Brian Demsky Date: Wed, 14 Dec 2016 16:30:00 -0800 Subject: [PATCH] Increase size of bootstrap bytes as some Linux distributions need more space. --- mymemory.cc | 4 ++-- test/load_in_if_cond.c | 28 ---------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 test/load_in_if_cond.c diff --git a/mymemory.cc b/mymemory.cc index d911f5d..8d95dfa 100644 --- a/mymemory.cc +++ b/mymemory.cc @@ -159,7 +159,7 @@ void model_free(void *ptr) /** Bootstrap allocation. Problem is that the dynamic linker calls require * calloc to work and calloc requires the dynamic linker to work. */ -#define BOOTSTRAPBYTES 4096 +#define BOOTSTRAPBYTES 131072 char bootstrapmemory[BOOTSTRAPBYTES]; size_t offset = 0; @@ -169,7 +169,7 @@ void * HandleEarlyAllocationRequest(size_t sz) sz = (sz + 7) & ~7; if (sz > (BOOTSTRAPBYTES-offset)) { - model_print("OUT OF BOOTSTRAP MEMORY\n"); + model_print("OUT OF BOOTSTRAP MEMORY. Increase the size of BOOTSTRAPBYTES in mymemory.cc\n"); exit(EXIT_FAILURE); } diff --git a/test/load_in_if_cond.c b/test/load_in_if_cond.c deleted file mode 100644 index 9b91ed0..0000000 --- a/test/load_in_if_cond.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -#include -#include "libinterface.h" - -struct node { - struct node * next; -}; - - -void foo() -{ - int i; - int x = 0; - - struct node * n = malloc(sizeof(struct node)); - n->next = 0; - - i = load_32(&x); - - if ((i = load_32(&x))) { - printf("%d\n", i); - } - - while (load_32(&n->next)) { - ; - } -} -- 2.34.1