Helper class for dma-heap allocations.
Definition dma_heaps.h:18
UniqueFD alloc(const char *name, std::size_t size)
Allocate a dma-buf from the DmaHeap.
Definition dma_heaps.cpp:137
DmaHeapFlag
Type of the dma-heap.
Definition dma_heaps.h:20
@ System
Allocate from the system dma-heap, using the page allocator.
@ Cma
Allocate from a CMA dma-heap, providing physically-contiguous memory.
~DmaHeap()
Destroy the DmaHeap instance.
DmaHeap(DmaHeapFlags flags=DmaHeapFlag::Cma)
Construct a DmaHeap of a given type.
Definition dma_heaps.cpp:91
bool isValid() const
Check if the DmaHeap instance is valid.
Definition dma_heaps.h:29
Type-safe container for enum-based bitfields.
Definition flags.h:16
unique_ptr-like wrapper for a file descriptor
Definition unique_fd.h:18
bool isValid() const
Check if the UniqueFD owns a valid file descriptor.
Definition unique_fd.h:61
#define LIBCAMERA_FLAGS_ENABLE_OPERATORS(_enum)
Enable bitwise operations on the enum enumeration.
Definition flags.h:189
Top-level libcamera namespace.
Definition backtrace.h:17
File descriptor wrapper that owns a file descriptor.