Commit ab0952cb authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

revise LockFreeRingBuffer::internalBufferLocation doc

Reviewed By: WillerZ

Differential Revision: D27489039

fbshipit-source-id: 5d397a24fcb165b7ea25e32f0c81435bce474b04
parent b3f67e05
...@@ -159,14 +159,11 @@ class LockFreeRingBuffer { ...@@ -159,14 +159,11 @@ class LockFreeRingBuffer {
return Cursor(ticket - backStep); return Cursor(ticket - backStep);
} }
// Returns the address and length of the internal buffer. /// Returns the address and length of the internal buffer.
// This can be useful to know if you are using LockFreeRingBuffer to store /// Unsafe to inspect this region at runtime. And not useful.
// things you want to be able to retrieve after a crash, and you are not /// Useful when using LockFreeRingBuffer to store data which must be retrieved
// dumping all memory when a crash occurs: you can add the result of this /// from a core dump after a crash if the given region is added to the list of
// call to the list of memory regions that are dumped. /// dumped memory regions.
// See `folly::FlightRecorder` for this use-case.
// It's not useful, or safe, to inspect this region at runtime (other than
// through the APIs above)
std::pair<void const*, size_t> internalBufferLocation() const { std::pair<void const*, size_t> internalBufferLocation() const {
return std::make_pair( return std::make_pair(
static_cast<void const*>(slots_.get()), static_cast<void const*>(slots_.get()),
......
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