4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-30 11:03:00 +08:00
xiongyihui3@gmail.com c77e9d5c76 add lua support for rt-thead
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2399 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-11-10 07:32:39 +00:00

18 lines
474 B
C

// Lua EGC (Emergeny Garbage Collector) interface
#ifndef __LEGC_H__
#define __LEGC_H__
#include "lstate.h"
// EGC operations modes
#define EGC_NOT_ACTIVE 0 // EGC disabled
#define EGC_ON_ALLOC_FAILURE 1 // run EGC on allocation failure
#define EGC_ON_MEM_LIMIT 2 // run EGC when an upper memory limit is hit
#define EGC_ALWAYS 4 // always run EGC before an allocation
void legc_set_mode(lua_State *L, int mode, unsigned limit);
#endif