Wrapper for GC finished, untested
This commit is contained in:
parent
ee53759ca5
commit
16aa1be309
4 changed files with 142 additions and 15 deletions
|
|
@ -1,22 +1,32 @@
|
|||
#ifndef __CHEAP_H__
|
||||
#define __CHEAP_H__
|
||||
#ifndef CHEAP_H
|
||||
#define CHEAP_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DEBUG
|
||||
|
||||
#ifdef DEBUG
|
||||
typedef struct cheap
|
||||
{
|
||||
void *obj;
|
||||
} cheap_t;
|
||||
#else
|
||||
struct cheap;
|
||||
typedef struct cheap cheap_t;
|
||||
#endif
|
||||
|
||||
cheap_t *cheap_the();
|
||||
void cheap_init();
|
||||
void cheap_dispose();
|
||||
void *cheap_alloc(unsigned long size);
|
||||
void cheap_set_profiler(bool mode);
|
||||
cheap_t *cheap_the() noexcept;
|
||||
void cheap_init() noexcept;
|
||||
void cheap_dispose() noexcept;
|
||||
void *cheap_alloc(unsigned long size) noexcept;
|
||||
void cheap_set_profiler(cheap_t *cheap, bool mode) noexcept;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __CHEAP_H__ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue