]> git.lizzy.rs Git - plan9front.git/blob - sys/man/2/privalloc
Import sources from 2011-03-30 iso image - lib
[plan9front.git] / sys / man / 2 / privalloc
1 .TH PRIVALLOC 2
2 .SH NAME
3 privalloc, privfree \- per-process private storage management
4 .SH SYNOPSIS
5 .B #include <u.h>
6 .br
7 .B #include <libc.h>
8 .ta \w'voidmmm'u
9 .PP
10 .B
11 void**  privalloc(void)
12 .PP
13 .B
14 void    privfree(void **p)
15 .SH DESCRIPTION
16 .I Privalloc
17 returns a pointer to a per-process private storage location.
18 The location is not shared among processes,
19 even if they share the same data segments.
20 It returns
21 .B nil
22 if there are no free slots available.
23 .PP
24 .I Privfree
25 releases a location allocated with
26 .IR privalloc .
27 It is legal to call
28 .I privfree
29 with
30 .I p
31 set to
32 .BR nil .
33 .SH SOURCE
34 .B /sys/src/libc/9sys/privalloc.c
35 .SH SEE ALSO
36 .IR exec (2)