summaryrefslogtreecommitdiffhomepage
path: root/src/internal/ntux_memfn_impl.h
blob: bb8e300f2d67f941ad64d0480c2754e00e83927c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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