From: Duncan B. <dhg...@fa...> - 2013-07-01 22:32:17
|
Hi, I've just started using SDCC, compiling for the Amstrad CPC 464 (Z80 CPU, 64kB RAM). The following code: void *block = (void*)0; long size = 0; while (1) { size += 128; block = malloc(size); if (block == (void*)0) { printf("done\r\n"); break; } else { printf("%ld\r\n", size); free(block); } } ... is only ever able to malloc() 896 bytes, producing the following output: 128 256 384 512 640 768 896 done -- Duncan Bayne ph: +61 420817082 | web: http://duncan-bayne.github.com/ | skype: duncan_bayne I usually check my mail every 24 - 48 hours. If there's something urgent going on, please send me an SMS or call me at the above number. |