From 31bfd34e9e791595f73ae19d71cc9a311ea5a3bd Mon Sep 17 00:00:00 2001 From: "zik.saleeba" Date: Sat, 7 Nov 2009 13:44:08 +0000 Subject: [PATCH] Now works for Opteron 64-bit git-svn-id: http://picoc.googlecode.com/svn/trunk@383 21eae674-98b7-11dd-bd71-f92a316d2d60 --- clibrary.c | 2 +- platform.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clibrary.c b/clibrary.c index f269f45..8f3e6b0 100644 --- a/clibrary.c +++ b/clibrary.c @@ -228,7 +228,7 @@ void GenericPrintf(struct ParseState *Parser, struct Value *ReturnValue, struct PrintStr("XXX", Stream); /* not enough parameters for format */ else { - NextArg = (struct Value *)((char *)NextArg + sizeof(struct Value) + TypeStackSizeValue(NextArg)); + NextArg = (struct Value *)((char *)NextArg + MEM_ALIGN(sizeof(struct Value) + TypeStackSizeValue(NextArg))); if (NextArg->Typ != FormatType && !((FormatType == &IntType || *FPos == 'f') && IS_NUMERIC_COERCIBLE(NextArg)) && !(FormatType == CharPtrType && (NextArg->Typ->Base == TypePointer || diff --git a/platform.h b/platform.h index 25aabe9..c34f91e 100644 --- a/platform.h +++ b/platform.h @@ -10,9 +10,6 @@ * #define UMON_HOST */ -#ifndef SURVEYOR_HOST -#define HEAP_SIZE 16384 /* default space for the heap and the stack */ -#endif #define LARGE_INT_POWER_OF_TEN 1000000000 /* the largest power of ten which fits in an int on this architecture */ #define ALIGN_TYPE void * /* the data type to use for alignment */ #define ARCH_ALIGN_WORDSIZE sizeof(ALIGN_TYPE) /* memory alignment boundary on this architecture */ @@ -38,6 +35,7 @@ /* host platform includes */ #ifdef UNIX_HOST +# define HEAP_SIZE (128*1024) /* space for the heap and the stack */ # include # include # include @@ -59,6 +57,7 @@ extern jmp_buf ExitBuf; #else # ifdef FLYINGFOX_HOST +# define HEAP_SIZE (16*1024) /* space for the heap and the stack */ # define NO_HASH_INCLUDE # include # include @@ -96,6 +95,7 @@ extern jmp_buf ExitBuf; # undef BIG_ENDIAN # else # ifdef UMON_HOST +# define HEAP_SIZE (128*1024) /* space for the heap and the stack */ # define NO_FP # include # include