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


Fix it, then Ship it!




Oops. I just realized as I was getting through this code review that it was 
just a code move into jobobject.hpp.  You can read my comment if you'd like. 
But I was going to sign off anyway :)


3rdparty/stout/include/stout/os/windows/jobobject.hpp
Lines 139 (patched)
<https://reviews.apache.org/r/66420/#comment281247>

    This is interesting. I understand how you're using this template function 
to allocate this structure on the stack which you use a reinterpret_cast on 
later as a substitute for the JOBOBJECT_BASIC_PROCESS_ID_LIST.
    
    But is this really worth doing?  Allocation and deallocation would happen 
entirely within this function. I imagine the data we need will be copied out 
before deallocation during the insert calls below on the set<Process> object, 
so the only real issue is the extra time associated with dynamic memory 
allocation/deallocation.
    
    What's hairy about the size calculations? I imagine it's not that bad, 
probably nothing you wouldn't do normally in C :)
    
    If you do end up staying with this structure, is there a reason the 
ProcessIdList member is a DWORD and not a ULONG_PTR, as per 
https://msdn.microsoft.com/en-us/library/windows/desktop/ms684150(v=vs.85).aspx 
?
    
    It's probably the case that on x86_64 that they are the same size, but why 
not mirror the structure identically?


- John Kordich


On April 4, 2018, 5:46 a.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66420/
> -----------------------------------------------------------
> 
> (Updated April 4, 2018, 5:46 a.m.)
> 
> 
> Review request for mesos, Akash Gupta, Eric Mumau, John Kordich, Joseph Wu, 
> and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The functions written to deal with job objects on Windows had become
> large enough to warrant being refactored into their own file. Also
> was the perfect opportunity to fix formatting issues.
> 
> When including `jobobject.hpp` for `killtree.hpp`, other unnecessary
> headers were removed.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/Makefile.am 742bfc44d68d978dd2249ece500d6f64e4d7f02a 
>   3rdparty/stout/include/stout/os/windows/jobobject.hpp PRE-CREATION 
>   3rdparty/stout/include/stout/os/windows/killtree.hpp 
> ce8bdcd18305ffb758f22a6c2bbc7393675aebdf 
>   3rdparty/stout/include/stout/windows/os.hpp 
> 739ee4da3f09d2a9597d4451e755e77903e9287d 
> 
> 
> Diff: https://reviews.apache.org/r/66420/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>

Reply via email to