diff options
Diffstat (limited to 'src/internal/ptycon_memfn_impl.h')
-rw-r--r-- | src/internal/ptycon_memfn_impl.h | 22 |
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 |