class SharedMemory
Defined at line 37 of file ../../third_party/perfetto/include/perfetto/ext/tracing/core/shared_memory.h
An abstract interface that models the shared memory region shared between
Service and Producer. The concrete implementation of this is up to the
transport layer. This can be as simple as a malloc()-ed buffer, if both
Producer and Service are hosted in the same process, or some posix shared
memory for the out-of-process case (see src/unix_rpc).
Both this class and the Factory are subclassed by the transport layer, which
will attach platform specific fields to it (e.g., a unix file descriptor).
Public Methods
void * start ()
Read/write and read-only access to underlying buffer. The non-const method
is implemented in terms of the const one so subclasses need only provide a
single implementation; implementing in the opposite order would be unsafe
since subclasses could effectively mutate state from inside a const method.
N.B. This signature implements "deep const" that ties the constness of this
object to the constness of the underlying buffer, as opposed to "shallow
const" that would have the signature `void* start() const;`; this is less
flexible for callers but prevents corner cases where it's transitively
possible to change this object's state via the controlled memory.
Defined at line 59 of file ../../third_party/perfetto/include/perfetto/ext/tracing/core/shared_memory.h
void ~SharedMemory ()
The transport layer is expected to tear down the resource associated to
this object region when destroyed.
const void * start ()
size_t size ()