diff options
-rw-r--r-- | src/lib/libc/stdlib/malloc.3 | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/libc/stdlib/malloc.3 b/src/lib/libc/stdlib/malloc.3 index e24a811bec..0053748991 100644 --- a/src/lib/libc/stdlib/malloc.3 +++ b/src/lib/libc/stdlib/malloc.3 | |||
@@ -30,9 +30,9 @@ | |||
30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
31 | .\" SUCH DAMAGE. | 31 | .\" SUCH DAMAGE. |
32 | .\" | 32 | .\" |
33 | .\" $OpenBSD: malloc.3,v 1.103 2017/03/07 06:07:50 otto Exp $ | 33 | .\" $OpenBSD: malloc.3,v 1.104 2017/03/17 17:00:38 deraadt Exp $ |
34 | .\" | 34 | .\" |
35 | .Dd $Mdocdate: March 7 2017 $ | 35 | .Dd $Mdocdate: March 17 2017 $ |
36 | .Dt MALLOC 3 | 36 | .Dt MALLOC 3 |
37 | .Os | 37 | .Os |
38 | .Sh NAME | 38 | .Sh NAME |
@@ -119,9 +119,14 @@ The | |||
119 | .Fn recallocarray | 119 | .Fn recallocarray |
120 | function is similar to | 120 | function is similar to |
121 | .Fn reallocarray | 121 | .Fn reallocarray |
122 | except that it takes care of clearing newly allocated memory. | 122 | except it ensures newly allocated memory is cleared similar to |
123 | Additionally, the memory that becomes unallocated while shrinking | 123 | .Xr calloc 3 . |
124 | or moving existing allocations is erased. | 124 | Memory that becomes unallocated while shrinking or moving existing |
125 | allocations is explicitly discarded (meaning, pages of memory | ||
126 | are disposed via | ||
127 | .Xr munmap 2 , | ||
128 | and smaller allocations are cleared with | ||
129 | .Xr explicit_bzero 3 Ns ). | ||
125 | If | 130 | If |
126 | .Fa ptr | 131 | .Fa ptr |
127 | is a | 132 | is a |