Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/lua/dist/src Change LUAL_BUFFERSIZE from 4-8K t...



details:   https://anonhg.NetBSD.org/src/rev/fc36540fad5a
branches:  trunk
changeset: 319336:fc36540fad5a
user:      alnsn <alnsn%NetBSD.org@localhost>
date:      Sat May 26 20:17:56 2018 +0000

description:
Change LUAL_BUFFERSIZE from 4-8K to 128 bytes for kernel-side Lua.

LUAL_BUFFERSIZE defines how much luaL_Buffer allocates from
the stack. Apparently, 4-8K is too much for the kernel stack.

diffstat:

 external/mit/lua/dist/src/luaconf.h |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r a0766957d3fc -r fc36540fad5a external/mit/lua/dist/src/luaconf.h
--- a/external/mit/lua/dist/src/luaconf.h       Sat May 26 19:20:21 2018 +0000
+++ b/external/mit/lua/dist/src/luaconf.h       Sat May 26 20:17:56 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: luaconf.h,v 1.21 2017/04/26 13:17:33 mbalmer Exp $     */
+/*     $NetBSD: luaconf.h,v 1.22 2018/05/26 20:17:56 alnsn Exp $       */
 
 /*
 ** Id: luaconf.h,v 1.259 2016/12/22 13:08:50 roberto Exp 
@@ -757,7 +757,9 @@
 ** smaller buffer would force a memory allocation for each call to
 ** 'string.format'.)
 */
-#if LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE
+#ifdef _KERNEL
+#define LUAL_BUFFERSIZE                128
+#elif LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE
 #define LUAL_BUFFERSIZE                8192
 #else
 #define LUAL_BUFFERSIZE   ((int)(0x80 * sizeof(void*) * sizeof(lua_Integer)))



Home | Main Index | Thread Index | Old Index