summaryrefslogtreecommitdiffstats
path: root/reftable/reftable-malloc.h
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2021-10-07 22:25:00 +0200
committerJunio C Hamano <gitster@pobox.com>2021-10-08 19:45:48 +0200
commitef8a6c62687984f2562463286e60ec1c66242b5c (patch)
treed4b9322abac1374099c652e77db52c14bf1a07c3 /reftable/reftable-malloc.h
parentreftable: add error related functionality (diff)
downloadgit-ef8a6c62687984f2562463286e60ec1c66242b5c.tar.xz
git-ef8a6c62687984f2562463286e60ec1c66242b5c.zip
reftable: utility functions
This commit provides basic utility classes for the reftable library. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/reftable-malloc.h')
-rw-r--r--reftable/reftable-malloc.h18
1 files changed, 18 insertions, 0 deletions
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 <stddef.h>
+
+/* 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