From ef8a6c62687984f2562463286e60ec1c66242b5c Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 7 Oct 2021 20:25:00 +0000 Subject: reftable: utility functions This commit provides basic utility classes for the reftable library. Signed-off-by: Han-Wen Nienhuys Helped-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- reftable/reftable-malloc.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 reftable/reftable-malloc.h (limited to 'reftable/reftable-malloc.h') diff --git a/reftable/reftable-malloc.h b/reftable/reftable-malloc.h new file mode 100644 index 0000000000..5f2185f1f3 --- /dev/null +++ b/reftable/reftable-malloc.h @@ -0,0 +1,18 @@ +/* +Copyright 2020 Google LLC + +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file or at +https://developers.google.com/open-source/licenses/bsd +*/ + +#ifndef REFTABLE_H +#define REFTABLE_H + +#include + +/* Overrides the functions to use for memory management. */ +void reftable_set_alloc(void *(*malloc)(size_t), + void *(*realloc)(void *, size_t), void (*free)(void *)); + +#endif -- cgit v1.3