array_truncate(3diet)

array_truncate3diet

Reduce number of initialized bytes

Usage

#include <array.h>

void array_truncate(array* x, uint64 membersize, int64 len);

array_truncate(&x,sizeof(t),len);

Overview

array_truncate reduces the number of initialized bytes in x to exactly len*sizeof(t). If the number of initialized bytes was already this small (or smaller), array_truncate has no effect. If len is negative, array_truncate has no effect. If x is unallocated, array_truncate has no effect. If x has failed, array_truncate has no effect.

array_truncate does not change the allocation in x. If you want to free the memory used by x, use array_reset.

Releases

Unchanged in 4 releases since Debian 3.1 (Sarge).

  1. 3.1–6.0

From libowfat-dev 0.28-2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.