> On Feb. 12, 2015, 9:06 p.m., Dominic Hamon wrote: > > src/linux/cgroups.hpp, line 344 > > <https://reviews.apache.org/r/30545/diff/3/?file=862209#file862209line344> > > > > if the caller is responsible for the lifetime of the process, this > > should be a unique_ptr (or Owned) > > Chi Zhang wrote: > It would work for pressurelistener, which has the same lifetime of the > underneath listening libprocss. > > But in the case of the oom listening, cgroups::listen spawns (spawn only > takes a raw pointer) it off and returns. using a owned will have memory of > the running libprocess freed. Try::get() returns a const ref, so I can' > 'release' the raw pointer out of it.
s/can'/can't/ - Chi ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30545/#review72242 ----------------------------------------------------------- On Feb. 12, 2015, 8:08 p.m., Chi Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30545/ > ----------------------------------------------------------- > > (Updated Feb. 12, 2015, 8:08 p.m.) > > > Review request for mesos, Dominic Hamon, Ian Downes, and Jie Yu. > > > Bugs: MESOS-2136 > https://issues.apache.org/jira/browse/MESOS-2136 > > > Repository: mesos > > > Description > ------- > > cgroups: added support to listen on memory pressures. > > > Diffs > ----- > > src/Makefile.am 39ce858fd009f8aef388bd3d6b17aa4c885ff9c9 > src/linux/cgroups.hpp bf8efee05b995a37d4e6e7679a493b2d5238aa0b > src/linux/cgroups.cpp b6f75b14dea7609b90627eccdd33ef891ed9d21f > src/tests/cgroups_tests.cpp 9d50a47c939f5f136c85fdcc555459512c6f2259 > src/tests/memory_test_helper.hpp PRE-CREATION > src/tests/memory_test_helper.cpp PRE-CREATION > src/tests/memory_test_helper_main.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/30545/diff/ > > > Testing > ------- > > > Thanks, > > Chi Zhang > >
