summaryrefslogtreecommitdiff
path: root/lib/libutils/isoc/bget.h
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2019-02-13 13:19:38 +0100
committerJérôme Forissier <jerome.forissier@linaro.org>2019-05-13 15:58:03 +0200
commit4e5706550a9624fbb6eadfc275036563a8737893 (patch)
tree2863de9ab363cd1fe4b076eb536763b80b355268 /lib/libutils/isoc/bget.h
parente1509d6e6178011df581c535ee8bf8c147053df2 (diff)
libutils: add free_wipe()
Adds function free_wipe(void *ptr) to clear a buffer before returning it to the heap. The pattern used to overwrite the data is 0x55. Users have to #include <stdlib_ext.h> to import the declaration. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Diffstat (limited to 'lib/libutils/isoc/bget.h')
-rw-r--r--lib/libutils/isoc/bget.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libutils/isoc/bget.h b/lib/libutils/isoc/bget.h
index 941647db..8071639c 100644
--- a/lib/libutils/isoc/bget.h
+++ b/lib/libutils/isoc/bget.h
@@ -17,6 +17,7 @@
*/
+
#ifndef _
#ifdef PROTOTYPES
#define _(x) x /* If compiler knows prototypes */
@@ -33,7 +34,7 @@ void *bget _((bufsize size, struct bpoolset *poolset));
void *bgetz _((bufsize size, struct bpoolset *poolset));
void *bgetr _((void *buffer, bufsize newsize,
struct bpoolset *poolset));
-void brel _((void *buf, struct bpoolset *poolset));
+void brel _((void *buf, struct bpoolset *poolset, int wipe));
void bectl _((int (*compact)(bufsize sizereq, int sequence),
void *(*acquire)(bufsize size),
void (*release)(void *buf), bufsize pool_incr,