X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Fregression%2Ftests%2Fmalloc.c;h=bbc36a0b4413dbdb19d7a38e89a0db1b5567afd3;hb=08f162fbcecbb15a9931c3891fe71892e698ad8e;hp=593f8c5e0d706442b90d3d779201fb0c8d96c262;hpb=f10e9b9b2ad097b2b1d12d396c078f9e4964da63;p=fw%2Fsdcc diff --git a/support/regression/tests/malloc.c b/support/regression/tests/malloc.c index 593f8c5e..bbc36a0b 100644 --- a/support/regression/tests/malloc.c +++ b/support/regression/tests/malloc.c @@ -1,12 +1,14 @@ /* Simple malloc tests. */ -#include #include #if defined(SDCC_pic16) #include #endif +#include +#if defined(SDCC_pic16) xdata char heap[100]; +#endif void testMalloc(void) @@ -18,11 +20,9 @@ testMalloc(void) #if !defined(__GNUC__) && !defined(SDCC_gbz80) && !defined(SDCC_z80) #if defined(SDCC_pic16) _initHeap(heap, sizeof heap); -#else - init_dynamic_memory(heap, sizeof(heap)); #endif - p1 = malloc(200); + p1 = malloc(2000); ASSERT(p1 == NULL); LOG(("p1 == NULL when out of memory\n")); #ifdef PORT_HOST