diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-03-05 20:55:08 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-03-05 20:55:08 -0800 |
| commit | 43c137b7a9ca046f272bb8e6971d8ce385563358 (patch) | |
| tree | 849532fba2e366fe9e8c609d8b8fb96b30edecfb /docs/man/nng_free.adoc | |
| parent | 2e9efe0f6d904f8e3c0bdd60f51ba7434f34e944 (diff) | |
| download | nng-43c137b7a9ca046f272bb8e6971d8ce385563358.tar.gz nng-43c137b7a9ca046f272bb8e6971d8ce385563358.tar.bz2 nng-43c137b7a9ca046f272bb8e6971d8ce385563358.zip | |
Add some man pages (alloc, free, version).
Diffstat (limited to 'docs/man/nng_free.adoc')
| -rw-r--r-- | docs/man/nng_free.adoc | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/man/nng_free.adoc b/docs/man/nng_free.adoc new file mode 100644 index 00000000..2b7b09a5 --- /dev/null +++ b/docs/man/nng_free.adoc @@ -0,0 +1,51 @@ += nng_free(3) +// +// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2018 Capitar IT Group BV <info@capitar.com> +// +// This document is supplied under the terms of the MIT License, a +// copy of which should be located in the distribution where this +// file was obtained (LICENSE.txt). A copy of the license may also be +// found online at https://opensource.org/licenses/MIT. +// + +== NAME + +nng_free - free memory + +== SYNOPSIS + +[source, c] +----------- +#include <nng/nng.h> + +void nng_free(void *ptr, size_t size); +----------- + +== DESCRIPTION + +The `nng_free()` function deallocates a memory region of size _size_, +that was previously allocated by <<nng_alloc#,nng_alloc(3)>> or +<<nng_recv#,nng_recv(3)>> with the `NNG_FLAG_ALLOC` flag. + +WARNING: It is very important that _size_ match the allocation size +used to allocate the memory. + +WARNING: Do not attempt to use this function to deallocate memory +obtained by a call to the system `malloc()` or `calloc()` functions, +or the {cpp} `new` operator. Doing so may result in unpredictable +behavior, including corruption of application memory. + +== RETURN VALUES + +None. + +== ERRORS + +None. + +== SEE ALSO + +<<nng_alloc#,nng_alloc(3)>>, +<<nng_recv#,nng_recv(3)>>, +<<nng#,nng(7)>> |
