Commit 038a01f1 authored by Vlad Tsyrklevich's avatar Vlad Tsyrklevich Committed by Commit Bot

Update some TODOs

Delete an outdated TODO (the memory routines are not likely to be
mergable as they are now, and will especially not be so if we choose to
use shared memory) and add a TODO.

Change-Id: I180f48d14d21dbbc80461fae23eb4d52de8efadd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1658713
Auto-Submit: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: default avatarVitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668990}
parent ac3c6e87
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
namespace gwp_asan { namespace gwp_asan {
namespace internal { namespace internal {
// TODO(vtsyrklevich): See if the platform-specific memory allocation and
// protection routines can be broken out in base/ and merged with those used for
// PartionAlloc/ProtectedMemory.
void* GuardedPageAllocator::MapRegion() { void* GuardedPageAllocator::MapRegion() {
if (void* hint = MapRegionHint()) if (void* hint = MapRegionHint())
if (void* ptr = if (void* ptr =
......
...@@ -80,6 +80,10 @@ class SamplingState { ...@@ -80,6 +80,10 @@ class SamplingState {
// On macOS, the first use of a thread_local variable on a new thread will // On macOS, the first use of a thread_local variable on a new thread will
// cause a malloc(), causing infinite recursion. Instead, use pthread TLS to // cause a malloc(), causing infinite recursion. Instead, use pthread TLS to
// store the counter. // store the counter.
//
// TODO: This is not necessary for PartitionAlloc and likely slower, refactor
// SamplingState to be able to use pthread TLS for malloc() and thread_local
// for PartitionAlloc in this case.
ALWAYS_INLINE size_t GetCounter() { ALWAYS_INLINE size_t GetCounter() {
return reinterpret_cast<size_t>(pthread_getspecific(tls_key_)); return reinterpret_cast<size_t>(pthread_getspecific(tls_key_));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment