diff options
author | Patrik Nyblom <[email protected]> | 2010-02-12 16:17:25 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-03-10 14:25:40 +0100 |
commit | 37950725305fb8e911556608402cba6e4e17b87d (patch) | |
tree | 94ceada2198b3e7d823e5a45486fa00087a44296 /erts/emulator/sys/common | |
parent | ac0b3f0a64705717d21e4a3d84d91d9c44f3baf7 (diff) | |
download | otp-37950725305fb8e911556608402cba6e4e17b87d.tar.gz otp-37950725305fb8e911556608402cba6e4e17b87d.tar.bz2 otp-37950725305fb8e911556608402cba6e4e17b87d.zip |
Fix further test-suite problems
Fix safe_mul in the loader, which caused failures in the bit
syntax test cases.
Fix yet another Uint in erl_alloc.h (ERTS_CACHE_LINE_SIZE) causing
segmentation fault when we have many schedulers (why only in that
situation?).
Clean up erl_mseg (remove old code for the Linux 32-bit mmap flag).
While at it, also remove compilation warnings.
Diffstat (limited to 'erts/emulator/sys/common')
-rw-r--r-- | erts/emulator/sys/common/erl_mseg.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/erts/emulator/sys/common/erl_mseg.c b/erts/emulator/sys/common/erl_mseg.c index 747c2e2a80..7b42c3e829 100644 --- a/erts/emulator/sys/common/erl_mseg.c +++ b/erts/emulator/sys/common/erl_mseg.c @@ -96,21 +96,12 @@ static void *pmremap(void *old_address, size_t old_size, #define MMAP_PROT (PROT_READ|PROT_WRITE) -#if HALFWORD_HEAP -# ifdef MAP_32BIT -# define RANGE_FLAG (MAP_32BIT) -# else -# error "Cannot have halfword heap if unable to restrict mmap areas -# endif -#else -# define RANGE_FLAG (0) -#endif #ifdef MAP_ANON -# define MMAP_FLAGS (MAP_ANON|MAP_PRIVATE|RANGE_FLAG) +# define MMAP_FLAGS (MAP_ANON|MAP_PRIVATE) # define MMAP_FD (-1) #else -# define MMAP_FLAGS (MAP_PRIVATE|RANGE_FLAG) +# define MMAP_FLAGS (MAP_PRIVATE) # define MMAP_FD mmap_fd static int mmap_fd; #endif @@ -1342,20 +1333,6 @@ erts_mseg_unit_size(void) { return page_size; } -#if HAVE_MMAP && HALFWORD_HEAP -#ifdef MAP_NORESERVE -#define RESERVE_FLAGS (MMAP_FLAGS | MAP_NORESERVE) -#else -#define RESERVE_FLAGS (MMAP_FLAGS) -#endif -static void halfword_reserve(void) -{ -#if HALFWORD_HEAP - initialize_pmmap(); -#endif - return; -} -#endif void erts_mseg_init(ErtsMsegInit_t *init) @@ -1385,7 +1362,7 @@ erts_mseg_init(ErtsMsegInit_t *init) #endif #if HAVE_MMAP && HALFWORD_HEAP - halfword_reserve(); + initialize_pmmap(); #endif page_size = GET_PAGE_SIZE; @@ -1740,8 +1717,6 @@ static void *pmmap(size_t size) /* nice, perfect fit */ res = *block; *block = (*block)->next; - //fprintf(stderr,"***** %p,%p,%ld,%p\n",res,*block,num_pages,first); - //dump_freelist(); } else { tail = (FreeBlock *) (((char *) ((void *) (*block))) + real_size); if (!do_map(tail,pagsz)) { |