marionnet-dev team mailing list archive
-
marionnet-dev team
-
Mailing list archive
-
Message #00705
[Branch ~marionnet-drivers/ocamlbricks/trunk] Rev 398: Fixed a possible very critical memory leak introduced in revno 388. The problem was occurring in ...
------------------------------------------------------------
revno: 398
committer: Jean-Vincent Loddo <loddo@xxxxxxxxxxxxxxxxxxxx>
branch nick: ocamlbricks
timestamp: Thu 2014-06-19 18:18:47 +0200
message:
Fixed a possible very critical memory leak introduced in revno 388. The problem was occurring in a thread calling the function `Linux.process.stat' repetitively in a loop. Strangely, the source of the problem seems to be the standard function `Scanf.fscanf'. In a way that I don't understand, `fscanf' seems able to get the GC confused: unused `Linux.process.stat' structures are indeed not collected (even forcing a collection with Gc.full_major). The workaround adopted consists in replacing `Scanf.fscanf ch' by a `Scanf.sscanf line' where `line' is read from `ch' by `Pervasives.input_line'. Now `stat' structures seem to be correctly collected.
modified:
SHELL/linux.ml
--
lp:ocamlbricks
https://code.launchpad.net/~marionnet-drivers/ocamlbricks/trunk
Your team marionnet-dev is subscribed to branch lp:ocamlbricks.
To unsubscribe from this branch go to https://code.launchpad.net/~marionnet-drivers/ocamlbricks/trunk/+edit-subscription
Follow ups