Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Simplify the mmalloc library further
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 1 Feb 2012 16:30:58 +0000 (17:30 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 1 Feb 2012 16:30:58 +0000 (17:30 +0100)
commit1086dc93eea1d88ee42e9317fda2278c784d0b60
treeb152265949b1dbe72be5607d102ef10624b70a05
parentd78311982007a2c778ff692c35c9d2787642c199
Simplify the mmalloc library further

* Stop playing with void* for the heap descriptors and introduce the
  xbt_mheap_t datatype for that.
* Don't try to make it work when mmalloc and friends are called with
  NULL as a first argument.

I added a pimple that mmalloc_preinit returns the default mhead after
creating it to simplify the code of the legacy functions that check
that this default mhead exist or create it before using it.

This extra check should be useless if mmalloc_preinit were called soon
enough since it's in the critical path, but the performance of
model-checking is not a concern yet: only getting something working
matters for now.
12 files changed:
include/xbt/mmalloc.h
src/xbt/mmalloc/attach.c
src/xbt/mmalloc/detach.c
src/xbt/mmalloc/mcalloc.c
src/xbt/mmalloc/mfree.c
src/xbt/mmalloc/mm_legacy.c
src/xbt/mmalloc/mmalloc.c
src/xbt/mmalloc/mmemalign.c
src/xbt/mmalloc/mmprivate.h
src/xbt/mmalloc/mrealloc.c
src/xbt/mmalloc/mvalloc.c
src/xbt_modinter.h