openPMD-api
Public Member Functions | Friends | List of all members
openPMD::DynamicMemoryView< T > Class Template Reference

A view into a buffer that might be reallocated at some points and thus has changing base pointers over time. More...

#include <Span.hpp>

Public Member Functions

Span< T > currentBuffer ()
 Acquire the underlying buffer at its current position in memory.
 

Friends

class RecordComponent
 

Detailed Description

template<typename T>
class openPMD::DynamicMemoryView< T >

A view into a buffer that might be reallocated at some points and thus has changing base pointers over time.

Reasoning: ADIOS2's span-based Engine::Put() API returns spans whose base pointers might change after internal reallocations. Hence, the concrete pointer needs to be acquired right before writing to it. Otherwise, a use after free might occur.


The documentation for this class was generated from the following files: