summaryrefslogtreecommitdiffhomepage
path: root/src/internal/ntux_memfn_impl.h
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-20 20:53:41 +0000
committermidipix <writeonce@midipix.org>2016-12-27 04:40:56 -0500
commit26e14f4143ec690a120e197a3adf547145e4ce59 (patch)
treee9e8b522de5abb14230c5f8e0825452f0c7ccb4b /src/internal/ntux_memfn_impl.h
parent70c49fc4ed3b2c3db68537f828c286241eeeee98 (diff)
downloadntux-26e14f4143ec690a120e197a3adf547145e4ce59.tar.bz2
ntux-26e14f4143ec690a120e197a3adf547145e4ce59.tar.xz
create free-standing, libpsxscl-based project skeleton.
Diffstat (limited to 'src/internal/ntux_memfn_impl.h')
-rw-r--r--src/internal/ntux_memfn_impl.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/internal/ntux_memfn_impl.h b/src/internal/ntux_memfn_impl.h
new file mode 100644
index 0000000..bb8e300
--- /dev/null
+++ b/src/internal/ntux_memfn_impl.h
@@ -0,0 +1,22 @@
+#ifndef NTUX_MEMFN_IMPL_H
+#define NTUX_MEMFN_IMPL_H
+
+#include <stdint.h>
+
+struct ntux_memory_block {
+ void * addr;
+ size_t size;
+ size_t used;
+ size_t avail;
+ size_t buffer[];
+};
+
+void * ntux_calloc(size_t n, size_t size);
+void ntux_free(void * addr);
+
+void * ntux_balloc(
+ struct ntux_memory_block * cache,
+ struct ntux_memory_block * block,
+ size_t n, size_t size);
+
+#endif