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

# holoscan::kDefaultUcxSerializationBufferSize

> The default size of the serialization buffer in bytes.

The default size of the serialization buffer in bytes.

```cpp showLineNumbers={false}
constexpr size_t holoscan::kDefaultUcxSerializationBufferSize = 130048
```

The max bcopy size used for the active message header will be slightly less than UCX\_TCP\_TX\_SEG\_SIZE and UCX\_TCP\_RX\_SEG\_SIZE which default to 8 kB. Note that this value can be overridden by setting environment variable HOLOSCAN\_UCX\_SERIALIZATION\_BUFFER\_SIZE. Setting HOLOSCAN\_UCX\_SERIALIZATION\_BUFFER\_SIZE will automatically set UCX\_TCP\_TX\_SEG\_SIZE and UCX\_TCP\_RX\_SEG\_SIZE if they were not explicitly set by the user.

\==Parameters==

* **allocator** (std::shared\_ptr\<holoscan::Allocator>, optional): The allocator used to allocate/free the buffer memory. If no allocator is set, an [`UnboundedAllocator`](../classes/unboundedallocator) will be used.
* **buffer\_size** (size\_t, optional): The size of the buffer in bytes (Defaults to [holoscan::kDefaultSerializationBufferSize](kdefaultserializationbuffersize)). The max buffer size that can be used depends on the maximum header size that can be sent by the UCX ucx\_am\_send\_nbx call used within the GXF UCX extension. That header size is affected by the segment size set for the transport layer. For TCP/IP the segment size is controlled by UCX\_TCP\_TX\_SEG\_SIZE and UCX\_TCP\_RX\_SEG\_SIZE.