From a9a3e089a22c469685cc78cf0c5fec1bfe8c0303 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 1 Feb 2012 15:40:07 +0100 Subject: [PATCH 1/1] kill little useless things in mmalloc. Still searching how to do the Big Cleanup on that code --- src/xbt/mmalloc/mmap-sup.c | 9 --------- src/xbt/mmalloc/mmprivate.h | 5 ----- 2 files changed, 14 deletions(-) diff --git a/src/xbt/mmalloc/mmap-sup.c b/src/xbt/mmalloc/mmap-sup.c index 28f89bc386..964e484c31 100644 --- a/src/xbt/mmalloc/mmap-sup.c +++ b/src/xbt/mmalloc/mmap-sup.c @@ -20,10 +20,6 @@ #include #include -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - #include "mmprivate.h" #include "xbt/ex.h" @@ -33,22 +29,17 @@ it out. */ static size_t pagesize; -#if NEED_DECLARATION_GETPAGESIZE -extern int getpagesize(void); -#endif #define PAGE_ALIGN(addr) (void*) (((long)(addr) + pagesize - 1) & \ ~(pagesize - 1)) /* Return MAP_PRIVATE if MDP represents /dev/zero. Otherwise, return MAP_SHARED. */ - #define MAP_PRIVATE_OR_SHARED(MDP) (( MDP -> flags & MMALLOC_ANONYMOUS) \ ? MAP_PRIVATE \ : MAP_SHARED) /* Return MAP_ANONYMOUS if MDP uses anonymous mapping. Otherwise, return 0 */ - #define MAP_IS_ANONYMOUS(MDP) (((MDP) -> flags & MMALLOC_ANONYMOUS) \ ? MAP_ANONYMOUS \ : 0) diff --git a/src/xbt/mmalloc/mmprivate.h b/src/xbt/mmalloc/mmprivate.h index d3f8442f1b..f351b59082 100644 --- a/src/xbt/mmalloc/mmprivate.h +++ b/src/xbt/mmalloc/mmprivate.h @@ -26,10 +26,6 @@ # endif #endif -#ifndef MIN -# define MIN(A, B) ((A) < (B) ? (A) : (B)) -#endif - #define MMALLOC_MAGIC "mmalloc" /* Mapped file magic number */ #define MMALLOC_MAGIC_SIZE 8 /* Size of magic number buf */ #define MMALLOC_VERSION 1 /* Current mmalloc version */ @@ -248,7 +244,6 @@ void mmalloc_display_info(void *h); #define MMALLOC_DEVZERO (1 << 0) /* Have mapped to /dev/zero */ #define MMALLOC_ANONYMOUS (1 << 1) /* Use anonymous mapping */ #define MMALLOC_INITIALIZED (1 << 2) /* Initialized mmalloc */ -#define MMALLOC_MMCHECK_USED (1 << 3) /* mmcheckf() called already */ /* Internal version of `mfree' used in `morecore'. */ -- 2.20.1