summaryrefslogtreecommitdiffstats
path: root/lpsm_alloc_size.3.in
blob: 95bf490ff546c0d7730fd90796b4e339faf15fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.\" -*- nroff -*- ---------------------------------------------------------
.\"   
.\"   Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
.\"
.\"   This program is free software; you can redistribute it and/or modify
.\"   it under the terms of the GNU Lesser General Public License as
.\"   published by the Free Software Foundation, Inc.,
.\"   59 Temple Place Ste 330, Bostom MA 02111-1307, USA; version 2.1,
.\"   incorporated herein by reference.
.\"
.\" -----------------------------------------------------------------------
.TH LPSM_ALLOC_SIZE 3  "18 November 2001" "LPSM @@VERSION@@" "Linux Persistent Memory"
.SH NAME
lpsm_alloc_size \- Get true size of a persistent memory allocation
.SH SYNOPSIS
.nf
.B #include <lpsm.h>
.sp
.BI "size_t lpsm_alloc_size(const void *" ptr ");"
.nl
.fi
.SH DESCRIPTION
.B lpsm_alloc_size()
returns the actual, as opposed to requested, size of the persistent
memory allocation specified by
.BR ptr .
This size is equal to or larger than the size passed to
.BR lpsm_malloc() ,
.BR lpsm_realloc() ,
.BR lpsm_zalloc() ,
or
.BR lpsm_calloc() .
.SH "RETURN VALUES"
.B lpsm_alloc_size()
returns the actual size of the indicated allocation, or 0 if
.I ptr
is
.BR NULL .
.SH "NOTES"
This function is comparable in execution time to
.B lpsm_realloc()
or
.BR lpsm_free() .
.SH "SEE ALSO"
.BR lpsm_realloc (3),
.BR lpsm_free (3),
.BR lpsm_alloc_stats (3),
.BR lpsm (7).