modified: src1/input.c
[GalaxyCodeBases.git] / c_cpp / lib / klib / kalloc.h
blobe891892994df3f124376071dbe809dfcda0ab337
1 #ifndef _KALLOC_H_
2 #define _KALLOC_H_
4 #include <stddef.h> /* for size_t */
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 typedef struct {
11 size_t capacity, available, n_blocks, n_cores, largest;
12 } km_stat_t;
14 void *kmalloc(void *km, size_t size);
15 void *krealloc(void *km, void *ptr, size_t size);
16 void *kcalloc(void *km, size_t count, size_t size);
17 void kfree(void *km, void *ptr);
19 void *km_init(void);
20 void km_destroy(void *km);
21 void km_stat(const void *_km, km_stat_t *s);
23 #ifdef __cplusplus
25 #endif
27 #endif