From 6e7c6ae56792add3f8d701eca7d144d96ed19458 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 21 Jun 2007 11:19:35 +0000 Subject: 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 --- crawl-ref/source/AppHdr.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/AppHdr.h') 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 -- cgit v1.2.3-54-g00ecf