{
int result;
void* malloc_base = NULL;
- unsigned long addr;
prom_handle root;
/* OF seems to do it, but I'm not very confident */
prom_init ((prom_entry) r5);
/* Allocate some memory for malloc'ator */
- for (addr = MALLOCADDR; addr <= MALLOCADDR * 16 ;addr+=0x100000) {
- malloc_base = prom_claim((void *)addr, MALLOCSIZE, 0);
- if (malloc_base != (void *)-1) break;
- }
+ malloc_base = prom_claim_chunk((void *)MALLOCADDR, MALLOCSIZE, 0);
if (malloc_base == (void *)-1) {
prom_printf("Can't claim malloc buffer (%d bytes at 0x%08x)\n",
MALLOCSIZE, MALLOCADDR);