Vips.tracked_malloc
Description: Reference for Vips.tracked_malloc

### Function

# Vipstracked_malloc

#### Declaration [src]

    void*
    vips_tracked_malloc (
      size_t size
    )

#### Description [src]

Allocate an area of memory that will be tracked by `vips_tracked_get_mem()` and friends.

If allocation fails, `vips_tracked_malloc()` returns `NULL` and sets an error message.

You must only free the memory returned with `vips_tracked_free()`.

See also

`vips_tracked_free()`, `vips_malloc()`.

#### Parameters

`size`

  Type: `size_t`

  Number of bytes to allocate.

#### Return value

Type: `void*`

A pointer to the allocated memory, or `NULL` on error.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.