> On Jan. 6, 2014, 7:25 p.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 888
> > <https://reviews.apache.org/r/16569/diff/4/?file=413787#file413787line888>
> >
> > If we're making total and free memory two separate function calls,
> > os::totalMemory and os::freeMemory seems more consistent.
> >
> > But, what about a single os::memory that returns a simple os::Memory
> > struct, rather than making two separate functions?
>
> Benjamin Hindman wrote:
> +1!
>
> Niklas Nielsen wrote:
> Ben H: +1 to merging the two functions into one or to change memory()
> into totalMemory()? :)
>
> If we consider continued breakdown of memory distribution (user, kernel
> buffers, caches, shared and so on), the shape of the struct would be OS
> dependent (think BSD's and Linux have different VM metrics) but that might be
> ok?
> Alternatively, we could have memory() returning the basic breakdown
> (total and free) in a struct and have auxiliary functions for the more
> specific ones?
>
> Ben M: Sorry for moving forward with this before getting your input. I
> will follow up with a subsequent review request for whatever we agree on here.
Having an os::Memory, just like we did for load average. Just having Memory {
Bytes total; Bytes free; } is pretty universal and super duper clean.
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16569/#review31245
-----------------------------------------------------------
On Jan. 2, 2014, 11:04 p.m., Niklas Nielsen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16569/
> -----------------------------------------------------------
>
> (Updated Jan. 2, 2014, 11:04 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> freeMemory() returns amount of free system memory. Can in
> combination with memory() be used to get total used memory.
> This allows future finer grained break-downs of used memory
> in user memory, kernel buffers/caches and so on.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 7c1f6ec
>
> Diff: https://reviews.apache.org/r/16569/diff/
>
>
> Testing
> -------
>
> make check and functional testing.
>
>
> Thanks,
>
> Niklas Nielsen
>
>