diff options
-rw-r--r-- | vespamalloc/src/vespamalloc/malloc/allocchunk.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vespamalloc/src/vespamalloc/malloc/allocchunk.h b/vespamalloc/src/vespamalloc/malloc/allocchunk.h index 64f45067e79..1106058ce53 100644 --- a/vespamalloc/src/vespamalloc/malloc/allocchunk.h +++ b/vespamalloc/src/vespamalloc/malloc/allocchunk.h @@ -23,9 +23,14 @@ struct TaggedPtr { #if defined(__x86_64__) #define VESPA_USE_ATOMIC_TAGGEDPTR TaggedPtr load(std::memory_order = std::memory_order_seq_cst) { + // Not that this is NOT an atomic load. The current use as the initial load + // in a compare_exchange loop is safe as a teader load will just give a retry. return *this; } void store(TaggedPtr ptr) { + // Not that this is NOT an atomic store. The current use is in a unit test as an initial + // store before any threads are started. Just done so keep api compability with std::atomic as + // that is the preferred implementation.. *this = ptr; } bool |