Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Don't free power_peak from the caller
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 24 Nov 2015 16:11:21 +0000 (17:11 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Wed, 25 Nov 2015 08:15:03 +0000 (09:15 +0100)
commitb0f7d03396e875f79a063b7a6eb8c5d78eac7c09
tree1124b3db9e904498125dae3155c18091b4d52204
parent43540e99b9c710a14e7626d346b3f45b8ed4e7e5
[surf] Don't free power_peak from the caller

The code was giving the power_peak array to the callee. The callers
might still need the power_peak. Freeing it in the callee creates
dangling pointers in the callers.

Instead we consider power_peak as immutable in the callee and make a
private copy when needed instead of stealing it from the callers.
examples/msg/token_ring/token_bypass.c
src/bindings/java/org/simgrid/surf/surfJAVA_wrap.cxx
src/bindings/lua/lua_platf.c
src/surf/cpu_cas01.cpp
src/surf/cpu_ti.cpp
src/surf/host_ptask_L07.cpp
src/surf/surf_routing.cpp
src/surf/surfxml_parse.c