Vips – 8.0: Operator index > By section > Memory
Description: Reference for Vips-8.0: Operator index > By section > Memory

#### Operator index > By section > Memory [src]

These functions cover two main areas.

First, some simple utility functions over the underlying `g_malloc()` / `g_free()` functions. Memory that is allocated and freed using these functions is interchangeable with any other GLib library.

Second, a pair of functions, `vips_tracked_malloc()` and `vips_tracked_free()`, which are NOT compatible. If you `g_free()` memory that has been allocated with `vips_tracked_malloc()` you will see crashes.

The tracked functions are only suitable for large allocations internal to the library, for example pixel buffers. libvips watches the total amount of live tracked memory and uses this information to decide when to trim caches.

## Functions

- `vips_malloc()`
- `vips_strdup()`
- `vips_tracked_free()`
- `vips_tracked_aligned_free()`
- `vips_tracked_malloc()`
- `vips_tracked_aligned_alloc()`
- `vips_tracked_get_mem()`
- `vips_tracked_get_mem_highwater()`
- `vips_tracked_get_allocs()`
- `vips_tracked_open()`
- `vips_tracked_close()`
- `vips_tracked_get_files()`

## Function macros

- `VIPS_FREEF()`
- `VIPS_FREE()`
- `VIPS_SETSTR()`
- `VIPS_MALLOC()`
- `VIPS_NEW()`
- `VIPS_ARRAY()`