From: Chris Hanson Date: Mon, 31 Jan 2000 03:42:03 +0000 (+0000) Subject: Simplify previous change. X-Git-Tag: 20090517-FFI~4286 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=201c3d4b18fa0965b1e0708c7a9fe9e5468cd26c;p=mit-scheme.git Simplify previous change. --- diff --git a/v7/src/microcode/ux.c b/v7/src/microcode/ux.c index faff93a99..8e2bb6e4b 100644 --- a/v7/src/microcode/ux.c +++ b/v7/src/microcode/ux.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ux.c,v 1.18 2000/01/31 03:32:37 cph Exp $ +$Id: ux.c,v 1.19 2000/01/31 03:42:03 cph Exp $ Copyright (c) 1990-2000 Massachusetts Institute of Technology @@ -656,21 +656,13 @@ void * freebsd_heap_malloc (unsigned long requested_length) { unsigned long ps = (getpagesize ()); - char * p = ((char *) ps); - void * addr; - while (p < 0x04000000) - { - addr - = (mmap (p, - (((requested_length + (ps - 1)) / ps) * ps), - (PROT_EXEC | PROT_READ | PROT_WRITE), - (MAP_PRIVATE | MAP_ANON | MAP_FIXED), - (-1), 0)); - if (addr != MAP_FAILED) - return (addr); - p += ps; - } - return (0); + void * addr + = (mmap (((void *) ps), + (((requested_length + (ps - 1)) / ps) * ps), + (PROT_EXEC | PROT_READ | PROT_WRITE), + (MAP_PRIVATE | MAP_ANON | MAP_FIXED), + (-1), 0)); + return ((addr == MAP_FAILED) ? 0 : addr); } #endif /* __FreeBSD__ */