diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-21 11:19:35 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-21 11:19:35 +0000 |
commit | 6e7c6ae56792add3f8d701eca7d144d96ed19458 (patch) | |
tree | 855f8b6bcdd61c92be270aa6df1efbad2f603547 /crawl-ref/source/AppHdr.h | |
parent | efe55b27c4832476e55ba9100da52daa74fdb75b (diff) | |
download | crawl-ref-6e7c6ae56792add3f8d701eca7d144d96ed19458.tar.gz crawl-ref-6e7c6ae56792add3f8d701eca7d144d96ed19458.zip |
Added support for limiting memory used by the Lua interpreter.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1613 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/AppHdr.h')
-rw-r--r-- | crawl-ref/source/AppHdr.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h index a42d8141a9..a96eb04111 100644 --- a/crawl-ref/source/AppHdr.h +++ b/crawl-ref/source/AppHdr.h @@ -43,17 +43,19 @@ #ifndef APPHDR_H #define APPHDR_H -#if defined(GCC) -# define HASH_CONTAINER_NS __gnu_cxx -# define HASH_CONTAINERS -#endif - -// Uncomment to enable the Crawl Lua bindings. You can also set this in your -// makefile by adding -DCLUA_BINDINGS to the CFLAGS line (this is preferred to -// editing AppHdr.h directly). +// Uncomment to enable the Crawl Lua bindings. You can also set this +// in your makefile by adding -DCLUA_BINDINGS to the CFLAGS line (this +// is preferred to editing AppHdr.h directly). // // #define CLUA_BINDINGS +// The maximum memory that the user-script Lua interpreter can +// allocate, in kilobytes. This limit is enforced to prevent +// badly-written or malicious user scripts from consuming too much +// memory. +// +#define CLUA_MAX_MEMORY_USE (2 * 1024) + // Enable support for Unicode character glyphs. Note that this needs // to be accompanied by changes to linker and compiler options and may // not be available on all platforms. In most cases you want to set |