> This page is for version 3.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 3.0 (Latest) (default): https://docs.nvidia.com/holoscan/sensor-bridge/3-0/llms.txt
> - 2.7: https://docs.nvidia.com/holoscan/sensor-bridge/2-7/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sensor-bridge/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sensor-bridge/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sensor-bridge/_mcp/server.

# hololink::module::ReceiverMemoryDescriptor

> A page-aligned region of GPU-accessible memory that a receiver writes incoming data into, usually on GPU directly accessible memory.

A page-aligned region of GPU-accessible memory that a receiver writes incoming data into, usually on GPU directly accessible memory.

The memory is not initialized. It is released when the descriptor is destroyed; the CUDA context it was created with must still be valid at that point. Because the memory is released with the descriptor, anything still using the address returned by get() must be finished first.

```cpp showLineNumbers={false}
#include <hololink/module/receiver_memory_descriptor.hpp>
```

---

## Constructors

### ReceiverMemoryDescriptor \[#receivermemorydescriptor]

```cpp showLineNumbers={false}
hololink::module::ReceiverMemoryDescriptor::ReceiverMemoryDescriptor(
    CUcontext context,
    size_t size,
    Placement placement = Placement::Automatic
)
```

Allocate the memory.

Initializes the CUDA driver if necessary and makes `context` the current CUDA context of the calling thread.

**Throws:** `std::overflow_error` if `size` is too large to allocate with page alignment.

**Throws:** `std::runtime_error` if a CUDA call fails, for example if the allocation cannot be satisfied.

**Parameters**

**`context`** `CUcontext`

CUDA context in which to allocate. The address returned by get() is valid in this context.

---

**`size`** `size_t`

Number of usable bytes required, starting at get(). It is not rounded up, so callers that need whole pages must do so themselves.

---

**`placement`** `Placement` — default: Placement::Automatic

Which allocator to use; see Placement.

---

---

## Methods

### get \[#get]

```cpp showLineNumbers={false}
CUdeviceptr hololink::module::ReceiverMemoryDescriptor::get() const
```

The start of the usable memory, as a GPU device address.

The address is aligned to the system page size, and at least `size` bytes (as given to the constructor) are available from it. It is constant for the life of the descriptor.

**Returns:** The device pointer.

---

## Types

### Placement

Where the memory comes from.

| Name        | Value | Description                                                                                                                                  |
| ----------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `Automatic` |       | Device memory (cuMemAlloc) on a discrete GPU; on an integrated GPU, device-mapped host memory (cuMemHostAlloc), which the CPU can also read. |
| `Device`    |       | Device memory (cuMemAlloc) on every GPU.                                                                                                     |