| @@ -14,6 +14,10 @@ | |||
| #include <stddef.h> | |||
| #include <stdint.h> | |||
| #ifdef __cplusplus | |||
| extern "C" { | |||
| #endif | |||
| struct smalloc_pool; | |||
| typedef size_t (*smalloc_oom_handler)(struct smalloc_pool *, size_t); | |||
| @@ -74,4 +78,8 @@ size_t sm_szalloc(const void *); /* get size of allocation */ | |||
| */ | |||
| int sm_malloc_stats(size_t *, size_t *, size_t *, int *); | |||
| #ifdef __cplusplus | |||
| } // extern "C" | |||
| #endif | |||
| #endif | |||
| @@ -12,6 +12,10 @@ | |||
| #include <limits.h> | |||
| #include <errno.h> | |||
| #ifdef __cplusplus | |||
| extern "C" { | |||
| #endif | |||
| struct smalloc_hdr { | |||
| size_t rsz; /* real allocated size with overhead (if any) */ | |||
| size_t usz; /* exact user size as reported by s_szalloc */ | |||
| @@ -37,4 +41,8 @@ int smalloc_is_alloc(struct smalloc_pool *spool, struct smalloc_hdr *shdr); | |||
| void *sm_realloc_pool_i(struct smalloc_pool *spool, void *p, size_t n, int nomove); | |||
| #ifdef __cplusplus | |||
| } // extern "C" | |||
| #endif | |||
| #endif | |||