### Method

# Vips Buf init_dynamic

#### Declaration [src]

    void
    vips_buf_init_dynamic (
      VipsBuf* buf,
      int mx
    )

#### Description [src]

Initialise and attach to a heap memory area. The memory area needs to be at least 4 bytes long.

    VipsBuf buf;

    vips_buf_init_dynamic(&buf, 256);

Dynamic buffers must be freed with `vips_buf_destroy()`, but their size can be set at runtime.

#### Parameters

`mx`

  Type: `int`

  The size of the storage area.