1 /* -----------------------------------------------------------------------------
2 * $Id: MBlock.h,v 1.8 2001/01/16 11:53:32 simonmar Exp $
4 * (c) The GHC Team, 1998-1999
6 * MegaBlock Allocator interface.
8 * ---------------------------------------------------------------------------*/
10 extern lnat mblocks_allocated;
12 #ifdef ENABLE_WIN32_DLL_SUPPORT
13 extern int is_heap_alloced(const void* p);
16 extern void * getMBlock(void);
17 extern void * getMBlocks(nat n);
19 #if freebsd2_TARGET_OS || freebsd_TARGET_OS
20 /* Executable is loaded from 0x0
21 * Shared libraries are loaded at 0x2000000
22 * Stack is at the top of the address space. The kernel probably owns
23 * 0x8000000 onwards, so we'll pick 0x5000000.
25 #define HEAP_BASE 0x50000000
27 #elif netbsd_TARGET_OS
28 /* NetBSD i386 shared libs are at 0x40000000
30 #define HEAP_BASE 0x50000000
31 #elif openbsd_TARGET_OS
32 #define HEAP_BASE 0x50000000
36 #define HEAP_BASE 0x50000000
38 #elif solaris2_TARGET_OS
40 #define HEAP_BASE 0x50000000
44 #define HEAP_BASE 0x50000000
48 #define HEAP_BASE 0x50000000
50 #elif macosx_TARGET_OS
52 #define HEAP_BASE 0x50000000
55 /* doesn't matter, we use a reserve/commit algorithm */
58 #error Dont know where to get memory from on this architecture
59 /* ToDo: memory locations on other architectures */