X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FMBlock.c;h=c0a619fbad87388faa202a76eeaf0a93c6008ec6;hb=53a7fa7dd4edbf25019cd4764f1b798bd8286975;hp=2626304bd3fe0081c23aa72edc98b2de03773ed0;hpb=5c633f42b55cb4d7851e6c6e80532acc232e8f42;p=ghc-hetmet.git diff --git a/ghc/rts/MBlock.c b/ghc/rts/MBlock.c index 2626304..c0a619f 100644 --- a/ghc/rts/MBlock.c +++ b/ghc/rts/MBlock.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: MBlock.c,v 1.12 1999/09/16 08:37:08 sof Exp $ + * $Id: MBlock.c,v 1.15 2000/04/03 15:24:21 rrt Exp $ * * (c) The GHC Team 1998-1999 * @@ -39,7 +39,7 @@ #include #endif -#if freebsd2_TARGET_OS || freebsd3_TARGET_OS +#if freebsd2_TARGET_OS || freebsd_TARGET_OS /* Executable is loaded from 0x0 * Shared libraries are loaded at 0x2000000 * Stack is at the top of the address space. The kernel probably owns @@ -47,6 +47,10 @@ */ #define ASK_FOR_MEM_AT 0x50000000 +#elif netbsd_TARGET_OS +/* NetBSD i386 shared libs are at 0x40000000 + */ +#define ASK_FOR_MEM_AT 0x50000000 #elif linux_TARGET_OS /* Any ideas? */ @@ -148,11 +152,12 @@ char* base_non_committed = (char*)0; #define SIZE_RESERVED_POOL ( 128 * 1024 * 1024 ) /* This predicate should be inlined, really. */ +/* TODO: this only works for a single chunk */ int is_heap_alloced(const void* x) { return (((char*)(x) >= base_non_committed) && - ((char*)(x) <= (base_non_committed + 128 * 1024 * 1024))); + ((char*)(x) <= (base_non_committed + SIZE_RESERVED_POOL))); } void *