xref: /csrg-svn/lib/libc/gen/valloc.3 (revision 48352)
1*48352Scael.\" Copyright (c) 1980, 1991 Regents of the University of California.
2*48352Scael.\" All rights reserved.
320467Smckusick.\"
4*48352Scael.\" %sccs.include.redist.man%
520467Smckusick.\"
6*48352Scael.\"     @(#)valloc.3	6.3 (Berkeley) 04/19/91
7*48352Scael.\"
8*48352Scael.Dd
9*48352Scael.Dt VALLOC 3
10*48352Scael.Os BSD 3
11*48352Scael.Sh NAME
12*48352Scael.Nm valloc
13*48352Scael.Nd aligned memory allocation function
14*48352Scael.Sh SYNOPSIS
15*48352Scael.Fd #include <unistd.h>
16*48352Scael.Ft char *
17*48352Scael.Fn valloc "unsigned size"
18*48352Scael.Sh DESCRIPTION
19*48352Scael.Bf -symbolic
20*48352ScaelValloc is obsoleted by the current version of malloc(3),
2128041Skarelswhich aligns page-sized and larger allocations.
22*48352Scael.Ef
23*48352Scael.Pp
24*48352ScaelThe
25*48352Scael.Fn valloc
26*48352Scaelfunction
2720467Smckusickallocates
28*48352Scael.Fa size
2920468Smckusickbytes aligned on a page boundary.
3020467SmckusickIt is implemented by calling
31*48352Scael.Xr malloc 3
3220467Smckusickwith a slightly larger request, saving the true beginning of the block
3320467Smckusickallocated, and returning a properly aligned pointer.
34*48352Scael.Sh RETURN VALUES
35*48352ScaelThe
36*48352Scael.Fn valloc
37*48352Scaelfunction returns
38*48352Scaela pointer to the allocated space if successful; otherwise
39*48352Scaela null pointer is returned
40*48352Scael.Sh HISTORY
41*48352ScaelThe
42*48352Scael.Fn valloc
43*48352Scaelfunction appeared in
44*48352Scael.Bx 3.0 .
45*48352Scael.Sh BUGS
46*48352ScaelA
47*48352Scael.Em vfree
48*48352Scaelfunction
49*48352Scaelhas not been implemented.
50