Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove the need of pthread_mutex in mmalloc, to allow its use with sthread
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 28 Jul 2022 23:51:52 +0000 (01:51 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 28 Jul 2022 23:58:09 +0000 (01:58 +0200)
commit872cf95ab5a2b08aa1f2c6ebba29b9f86b0ba54e
treeca37e81cbdf20908b2cab0c043f4bccdaeaa15d4
parent31ddf2bdaa6849e11dc0d3c800b53c6e9de896c0
Remove the need of pthread_mutex in mmalloc, to allow its use with sthread

Historically, mmalloc was used in all case when MC was activated at
build time (even if MC was not involved at runtime), forcing this
protection against race conditions for e.g. parallel simulations.

But nowadays, mmalloc is only activated at runtime in the verified
application. In other runtime setups, mmalloc uses the libc's malloc
implem instead of itself (that's why we use dlsym in the
initialization of mmalloc, to find the replacement).

So, removing this code should have no impact whatsoever.
Only maybe speeding up the verification a tiny bit.

And now, sthread becomes usable in conjunction with Mc Simgrid!!!

Given the current poor coverage of the pthread API, we can't verify
any useful program, but at least we have a valid (and rather robust)
prototype of such a verification tool.
src/include/xbt/mmalloc.h
src/simgrid/sg_config.cpp
src/xbt/mmalloc/mfree.c
src/xbt/mmalloc/mm_legacy.c
src/xbt/mmalloc/mm_module.c
src/xbt/mmalloc/mmprivate.h