From 967603b36ff1f230fbb9b5db91bc51119cae1574 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 1 Feb 2012 15:48:55 +0100 Subject: [PATCH] kill the sbrk-based morecore: we'll never use less than two heaps when using mmalloc --- src/xbt/mmalloc/mm.c | 1 - src/xbt/mmalloc/sbrk-sup.c | 39 -------------------------------------- 2 files changed, 40 deletions(-) delete mode 100644 src/xbt/mmalloc/sbrk-sup.c diff --git a/src/xbt/mmalloc/mm.c b/src/xbt/mmalloc/mm.c index c5a79c4d5d..7396adda8d 100644 --- a/src/xbt/mmalloc/mm.c +++ b/src/xbt/mmalloc/mm.c @@ -25,5 +25,4 @@ #include "mmap-sup.c" #include "attach.c" #include "detach.c" -#include "sbrk-sup.c" #include "mm_legacy.c" diff --git a/src/xbt/mmalloc/sbrk-sup.c b/src/xbt/mmalloc/sbrk-sup.c deleted file mode 100644 index 40638c970c..0000000000 --- a/src/xbt/mmalloc/sbrk-sup.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Support for sbrk() regions. - Copyright 1992, 2000 Free Software Foundation, Inc. - Contributed by Fred Fish at Cygnus Support. fnf@cygnus.com */ - -/* Copyright (c) 2010. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include /* Prototypes for sbrk (maybe) */ - -#include /* Prototypes for memcpy, memmove, memset, etc */ - -#include "xbt.h" -#include "mmprivate.h" - -static void *sbrk_morecore(struct mdesc *mdp, int size); -#if NEED_DECLARATION_SBRK -extern void *sbrk(int size); -#endif - - -/* Use sbrk() to get more core. */ - -static void *sbrk_morecore(mdp, size) -struct mdesc *mdp; -int size; -{ - void *result; - - if ((result = sbrk(size)) == (void *) -1) { - result = NULL; - } else { - mdp->breakval = (char *) mdp->breakval + size; - mdp->top = (char *) mdp->top + size; - } - return (result); -} -- 2.20.1