### Constructor

# Hex Document new

#### Declaration

    HexDocument*
    hex_document_new (
      void
    )

#### Description

Create a new empty `HexDocument` object.

Since 4.6, the HEX_BUFFER environment variable can optionally be set to specify which backend should be tried first as the default. Otherwise, the `mmap` buffer will be attempted to be loaded if available, and if it is not, it will fall back to the `malloc` buffer backend.

#### Return value

Type: `HexDocument`

A new `HexDocument` object.

The caller of the function takes ownership of the data, and is responsible for freeing it.