aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/memory.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-10-01 20:12:13 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 16:27:02 -0500
commitcd3d9986f40fd4e605ac2e8168512065439173e2 (patch)
tree72d0418cbd8b8b5c7e43880c68831819e12b1982 /include/serd/memory.h
parent1f09497ae009daade56c450e73bf6425b27cea24 (diff)
downloadserd-cd3d9986f40fd4e605ac2e8168512065439173e2.tar.gz
serd-cd3d9986f40fd4e605ac2e8168512065439173e2.tar.bz2
serd-cd3d9986f40fd4e605ac2e8168512065439173e2.zip
Split up public API header
Diffstat (limited to 'include/serd/memory.h')
-rw-r--r--include/serd/memory.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/serd/memory.h b/include/serd/memory.h
new file mode 100644
index 00000000..1bbd649c
--- /dev/null
+++ b/include/serd/memory.h
@@ -0,0 +1,33 @@
+// Copyright 2011-2022 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: ISC
+
+#ifndef SERD_MEMORY_H
+#define SERD_MEMORY_H
+
+#include "serd/attributes.h"
+
+SERD_BEGIN_DECLS
+
+/**
+ @defgroup serd_allocator Allocator
+ @ingroup serd_memory
+ @{
+*/
+
+/**
+ Free memory allocated by Serd.
+
+ This function exists because some systems require memory allocated by a
+ library to be freed by code in the same library. It is otherwise equivalent
+ to the standard C free() function.
+*/
+SERD_API void
+serd_free(void* SERD_NULLABLE ptr);
+
+/**
+ @}
+*/
+
+SERD_END_DECLS
+
+#endif // SERD_MEMORY_H