mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Re: Review Request 51967: Changed return type of `os::pagesize` in stout.
Date Fri, 16 Sep 2016 20:11:46 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51967/#review149249
-----------------------------------------------------------


Ship it!




Confirmed that this doesn't break the Windows build.

- Joseph Wu


On Sept. 16, 2016, 12:02 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51967/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2016, 12:02 p.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, `os::pagesize` returned a signed integer (`int`), where a
> negative value indicated an error. This is problematic: several callers
> neglected to check for errors and most callers ultimately want an
> unsigned value anyway.
> 
> We could make this return `Try<size_t>`, but that seems heavyweight: the
> Win32 implementation of this function will never fail and the POSIX
> implementation (using `sysconf(3)`) seems unlikely to fail in
> practice. Hence, this commit changes `os::pagesize` to return `size_t`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/os/freebsd.hpp 3f5142c81f4ea363238d6b546130e51518fd9daa

>   3rdparty/stout/include/stout/os/linux.hpp 33825280eb1404bcd89324f8ab5949f735b2d130

>   3rdparty/stout/include/stout/os/osx.hpp 54d34121d8cde434fca60679e19eae507b4048ba 
>   3rdparty/stout/include/stout/os/posix/pagesize.hpp f3ae69adf096d558e083615dfcf848c94e017e6e

>   3rdparty/stout/include/stout/os/windows/pagesize.hpp 6112e9781a9d42f7ec1ae0832c0c877d1915b09b

> 
> Diff: https://reviews.apache.org/r/51967/diff/
> 
> 
> Testing
> -------
> 
> `make check` on OSX and Linux.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message