summaryrefslogtreecommitdiffstats
path: root/doc/manual/example4/function.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/example4/function.c')
-rw-r--r--doc/manual/example4/function.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/manual/example4/function.c b/doc/manual/example4/function.c
new file mode 100644
index 0000000..8666666
--- /dev/null
+++ b/doc/manual/example4/function.c
@@ -0,0 +1,10 @@
+#include <stdlib.h>
+#include <malloc.h>
+
+void* custom_allocate(int num_bytes) {
+ return malloc(num_bytes);
+}
+
+void custom_free(void* data) {
+ free(data);
+}