From ec2d068ad2f30860ebe569929609888acb662117 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 20 Mar 2018 13:10:32 +0100 Subject: [PATCH] move an internal header out of the public directory --- {include => src/include}/xbt/mmalloc.h | 14 +++++++------- tools/cmake/DefinePackages.cmake | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) rename {include => src/include}/xbt/mmalloc.h (87%) diff --git a/include/xbt/mmalloc.h b/src/include/xbt/mmalloc.h similarity index 87% rename from include/xbt/mmalloc.h rename to src/include/xbt/mmalloc.h index 62d0a00805..ab6ca00e2a 100644 --- a/include/xbt/mmalloc.h +++ b/src/include/xbt/mmalloc.h @@ -12,11 +12,11 @@ #include "src/internal_config.h" #if HAVE_MMALLOC -# include /* for size_t */ -# include /* for NULL */ +#include /* for NULL */ +#include /* for size_t */ -#include "xbt/dynar.h" #include "xbt/dict.h" +#include "xbt/dynar.h" SG_BEGIN_DECL() @@ -27,13 +27,13 @@ SG_BEGIN_DECL() * The heap structure itself is an opaque object that shouldnt be messed with. */ typedef struct mdesc s_xbt_mheap_t; -typedef struct mdesc *xbt_mheap_t; +typedef struct mdesc* xbt_mheap_t; /* Allocate SIZE bytes of memory (and memset it to 0). */ XBT_PUBLIC void* mmalloc(xbt_mheap_t md, size_t size); /* Allocate SIZE bytes of memory (and don't mess with it) */ -void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size); +void* mmalloc_no_memset(xbt_mheap_t mdp, size_t size); /* Re-allocate the previously allocated block in void*, making the new block SIZE bytes long. */ XBT_PUBLIC void* mrealloc(xbt_mheap_t md, void* ptr, size_t size); @@ -59,11 +59,11 @@ xbt_mheap_t mmalloc_set_current_heap(xbt_mheap_t new_heap); xbt_mheap_t mmalloc_get_current_heap(void); size_t mmalloc_get_bytes_used(xbt_mheap_t); -ssize_t mmalloc_get_busy_size(xbt_mheap_t, void *ptr); +ssize_t mmalloc_get_busy_size(xbt_mheap_t, void* ptr); void* malloc_no_memset(size_t n); SG_END_DECL() #endif -#endif /* SIMGRID_MMALLOC_H */ +#endif /* SIMGRID_MMALLOC_H */ diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 7725339e49..6d81ef13e3 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -8,6 +8,7 @@ set(EXTRA_DIST src/include/simgrid/sg_config.h src/include/surf/surf.hpp src/include/xbt/parmap.hpp + src/include/xbt/mmalloc.h src/mc/mc_mmu.hpp src/mc/mc_record.hpp src/mc/PageStore.hpp @@ -741,7 +742,6 @@ set(headers_to_install include/xbt/log.hpp include/xbt/mallocator.h include/xbt/misc.h - include/xbt/mmalloc.h include/xbt/module.h include/xbt/parmap.h include/xbt/range.hpp -- 2.20.1