From 44f7aba37b277a94f17d4425bd6b27e62e53ebf9 Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Tue, 18 Sep 2018 19:11:03 +0300 Subject: [PATCH] Added: ndbuf_free_item manpage; --- man/Makefile.am | 2 +- man/ndbuf_free_item.3 | 1 + man/ndbuf_new.3 | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 120000 man/ndbuf_free_item.3 diff --git a/man/Makefile.am b/man/Makefile.am index c8b0198..8df0c4b 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,2 +1,2 @@ man_MANS = ndbuf_new.3 ndbuf_new_palloc.3 ndbuf_new_wmops.3 ndbuf_new_frombuf.3 \ - ndbuf_free.3 + ndbuf_free.3 ndbuf_free_item.3 diff --git a/man/ndbuf_free_item.3 b/man/ndbuf_free_item.3 new file mode 120000 index 0000000..d546da9 --- /dev/null +++ b/man/ndbuf_free_item.3 @@ -0,0 +1 @@ +ndbuf_new.3 \ No newline at end of file diff --git a/man/ndbuf_new.3 b/man/ndbuf_new.3 index fbded18..809a58a 100644 --- a/man/ndbuf_new.3 +++ b/man/ndbuf_new.3 @@ -23,6 +23,8 @@ ndbuf_t *ndbuf_new_wmops(const struct ndbuf_memops *, const size_t); void ndbuf_free(ndbuf_t *); +void ndbuf_free_item(ndbuf_t *b, void *ip, size_t is); + struct ndbuf_memops { .br void *(*alloc)(size_t); @@ -103,6 +105,13 @@ function pointer is provided. .B NDBUF_RORB flag is set. .br + +.br +.B void ndbuf_free_item(ndbuf_t*, void*, size_t) +will free allocated item via escan function, if flag +.B NDBUF_BURN +is set and size in't 0 memset() or zero() custom function will be called prior to free. This function is using default memory allocation/deallocation functions or (if provided) custom ones. +.br .SH RETURN VALUE .B ndbuf_new family of functions returns a pointer to newly created