diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/malloc.3 | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/lib/libc/stdlib/malloc.3 b/src/lib/libc/stdlib/malloc.3 index a943d1baf5..526fa099d2 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.113 2017/04/17 18:07:15 otto Exp $ | 33 | .\" $OpenBSD: malloc.3,v 1.114 2017/04/23 06:36:36 otto Exp $ |
| 34 | .\" | 34 | .\" |
| 35 | .Dd $Mdocdate: April 17 2017 $ | 35 | .Dd $Mdocdate: April 23 2017 $ |
| 36 | .Dt MALLOC 3 | 36 | .Dt MALLOC 3 |
| 37 | .Os | 37 | .Os |
| 38 | .Sh NAME | 38 | .Sh NAME |
| @@ -155,16 +155,21 @@ and checks for integer overflow in the calculation | |||
| 155 | Used for the allocation of memory holding sensitive data, | 155 | Used for the allocation of memory holding sensitive data, |
| 156 | the | 156 | the |
| 157 | .Fn recallocarray | 157 | .Fn recallocarray |
| 158 | and | ||
| 159 | .Fn freezeo | ||
| 160 | functions guarantee that memory becoming unallocated is explicitly | ||
| 161 | .Em discarded , | ||
| 162 | meaning pages of memory are disposed via | ||
| 163 | .Xr munmap 2 | ||
| 164 | and cached free objects are cleared with | ||
| 165 | .Xr explicit_bzero 3 . | ||
| 166 | .Pp | ||
| 167 | The | ||
| 168 | .Fn recallocarray | ||
| 158 | function is similar to | 169 | function is similar to |
| 159 | .Fn reallocarray | 170 | .Fn reallocarray |
| 160 | except it ensures newly allocated memory is cleared similar to | 171 | except it ensures newly allocated memory is cleared similar to |
| 161 | .Fn calloc . | 172 | .Fn calloc . |
| 162 | Memory that becomes unallocated while shrinking or moving existing | ||
| 163 | allocations is explicitly discarded (meaning, pages of memory | ||
| 164 | are disposed via | ||
| 165 | .Xr munmap 2 , | ||
| 166 | and smaller allocations are cleared with | ||
| 167 | .Xr explicit_bzero 3 ) . | ||
| 168 | If | 173 | If |
| 169 | .Fa ptr | 174 | .Fa ptr |
| 170 | is | 175 | is |
