*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: reallocarr | Section: 3 | Source: MINIX | File: reallocarr.3
REALLOCARR(3) FreeBSD Library Functions Manual REALLOCARR(3) NAME reallocarr - reallocate array SYNOPSIS #include <stdlib.h> int reallocarr(void *ptr, size_t number, size_t size); DESCRIPTION The reallocarr function reallocates the memory in *ptr. RETURN VALUES On successful completion, returns 0 and updates *ptr. Otherwise, an error code (see errno(2)) is returned and *ptr and the referenced memory is unmodified. EXAMPLES The following uses reallocarr() to initialize an array of INITSIZE integers, then resizes it to NEWSIZE elements: int *data = NULL; int ret = 0; ret = reallocarr(&data, INITSIZE, sizeof(*data)); if (ret) errc(1, ret, "reallocarr failed"); ret = reallocarr(&data, NEWSIZE, sizeof(*data)); if (ret) errc(1, ret, "reallocarr failed on resize"); SEE ALSO calloc(3) HISTORY reallocarr first appeared in NetBSD 7.0. OpenBSD introduced the reallocarray(3) function for the same purpose, but the interface makes it difficult to correctly handle zero-sized allocations. FreeBSD 14.1-RELEASE-p8 February 19, 2015 FreeBSD 14.1-RELEASE-p8

Navigation Options