summaryrefslogtreecommitdiffhomepage
path: root/src/internal/ptycon_memfn_impl.h
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-07-04 00:50:42 -0400
committermidipix <writeonce@midipix.org>2016-07-21 03:47:24 -0400
commit0efa8cf1d20712cbfaa549d31a8ebc11a23f78ec (patch)
tree784e6b7220f8f7b75fddf4e95776e3e9f9f1642a /src/internal/ptycon_memfn_impl.h
parent9afa0dab7afbc1f86c0c3ee656c6c92c872734b7 (diff)
downloadptycon-0efa8cf1d20712cbfaa549d31a8ebc11a23f78ec.tar.bz2
ptycon-0efa8cf1d20712cbfaa549d31a8ebc11a23f78ec.tar.xz
created free-standing project skeleton.
Diffstat (limited to 'src/internal/ptycon_memfn_impl.h')
-rw-r--r--src/internal/ptycon_memfn_impl.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/internal/ptycon_memfn_impl.h b/src/internal/ptycon_memfn_impl.h
new file mode 100644
index 0000000..9a58752
--- /dev/null
+++ b/src/internal/ptycon_memfn_impl.h
@@ -0,0 +1,22 @@
+#ifndef PTYCON_MEMFN_IMPL_H
+#define PTYCON_MEMFN_IMPL_H
+
+#include <stdint.h>
+
+struct ptyc_memory_block {
+ void * addr;
+ size_t size;
+ size_t used;
+ size_t avail;
+ size_t buffer[];
+};
+
+void * ptyc_calloc(size_t n, size_t size);
+void ptyc_free(void * addr);
+
+void * ptyc_balloc(
+ struct ptyc_memory_block * cache,
+ struct ptyc_memory_block * block,
+ size_t n, size_t size);
+
+#endif