Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]);
why didn't we update this one, too?
auto vec = base::HeapArray<char>::WithSize(max_vec_size);
#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
auto vec = base::HeapArray<unsigned char>::WithSize(max_vec_size);
we should probably just merge these cases into a HeapArray<uint8_t> and deal with consequences later, perhaps converting as needed.
vec.data()[i].VirtualAddress =
Shouldn't need to call .data() here, doing so skirts safety provided by heap array's operator[].
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Addressed reviews.
Please check my code updates.
std::unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]);
why didn't we update this one, too?
I have merged lines 114-121 into:
auto vec = base::HeapArray<uint8_t>::WithSize(max_vec_size);
auto vec = base::HeapArray<char>::WithSize(max_vec_size);
#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
auto vec = base::HeapArray<unsigned char>::WithSize(max_vec_size);
we should probably just merge these cases into a HeapArray<uint8_t> and deal with consequences later, perhaps converting as needed.
I have merged lines 114-121 into:
auto vec = base::HeapArray<uint8_t>::WithSize(max_vec_size);
Shouldn't need to call .data() here, doing so skirts safety provided by heap array's operator[].
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Kindly review my updates.
This CL needs review.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This CL needs review.
Please take a look at build failures on Mac and Win, you'll need to cast pointers to the right types there.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Mikhail KhokhlovThis CL needs review.
Please take a look at build failures on Mac and Win, you'll need to cast pointers to the right types there.
I have addressed them.
Please review and try building it again.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
LGTM from my side, but please also wait for someone who has a broader context on this change to approve.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
auto vec = base::HeapArray<char>::WithSize(max_vec_size);
#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
auto vec = base::HeapArray<unsigned char>::WithSize(max_vec_size);
Nakuru Wubniwe should probably just merge these cases into a HeapArray<uint8_t> and deal with consequences later, perhaps converting as needed.
I have merged lines 114-121 into:
auto vec = base::HeapArray<uint8_t>::WithSize(max_vec_size);
Hello, Tom.
This approach didn't work.
I had to revert your suggestion to the way I had it before.
All the checks are fine now.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
DWORD vec_size = static_cast<DWORD>(
page_count * sizeof(PSAPI_WORKING_SET_EX_INFORMATION));
we can make a span from vec.first(static_cast<DWORD>(...)) then pass span.data(), span.size() on the next line.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
DWORD vec_size = static_cast<DWORD>(
page_count * sizeof(PSAPI_WORKING_SET_EX_INFORMATION));
we can make a span from vec.first(static_cast<DWORD>(...)) then pass span.data(), span.size() on the next line.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
static_cast<DWORD>(span.size()));
This would seem to be a byte count in the old code, but an element count in the new code.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
static_cast<DWORD>(span.size()));
This would seem to be a byte count in the old code, but an element count in the new code.
Hi, Tom.
I removed the static_cast<DWORD>.
Does having just span.size() fix it?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
static_cast<DWORD>(span.size()));
Nakuru WubniThis would seem to be a byte count in the old code, but an element count in the new code.
Hi, Tom.
I removed the static_cast<DWORD>.
Does having just span.size() fix it?
No, there's a multiplication by sizeof() that is missing. size_bytes() does this for us.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
static_cast<DWORD>(span.size()));
Nakuru WubniThis would seem to be a byte count in the old code, but an element count in the new code.
Tom SepezHi, Tom.
I removed the static_cast<DWORD>.
Does having just span.size() fix it?
No, there's a multiplication by sizeof() that is missing. size_bytes() does this for us.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +2 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
(p.s. wrong Adam Langley was set as a reviewer.)
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi,
This CL is ready to submit.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I don't have the rights to commit. Please any committer should submit.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Replaced unique_ptr with HeapArray in
base/trace_event/process_memory_dump.cc
This cl changed occurences of unique_ptr to HeapArray
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |