sockaddr's now require length (K. Sklower);
[unix-history] / usr / src / lib / libc / gen / valloc.3
CommitLineData
09c5700e
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
ba92586e 5.\" @(#)valloc.3 6.2 (Berkeley) %G%
09c5700e 6.\"
ba92586e 7.TH VALLOC 3C ""
09c5700e
KM
8.UC 3
9.SH NAME
10valloc \- aligned memory allocator
11.SH SYNOPSIS
12.nf
13.B char *valloc(size)
14.B unsigned size;
15.fi
16.SH DESCRIPTION
ba92586e
MK
17.ft B
18Valloc is obsoleted by the current version of malloc,
19which aligns page-sized and larger allocations.
20.ft R
21.PP
09c5700e
KM
22.I Valloc
23allocates
24.I size
c17b03b3 25bytes aligned on a page boundary.
09c5700e
KM
26It is implemented by calling
27.IR malloc (3)
28with a slightly larger request, saving the true beginning of the block
29allocated, and returning a properly aligned pointer.
30.SH DIAGNOSTICS
31.I Valloc
32returns a null pointer (0) if there is no available memory
33or if the arena has been detectably corrupted by storing outside the bounds
34of a block.
35.SH BUGS
36.I Vfree
37isn't implemented.