Skip to content

Commit c4a8b94

Browse files
committed
lua: Increased LUA_MEM_SIZE for 64 bit
1 parent 7a1c099 commit c4a8b94

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

examples/lua_basic/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727

2828
#include "blob/main.lua.h"
2929

30+
#if (__SIZEOF_POINTER__ == 8)
31+
#define LUA_MEM_SIZE (22000)
32+
#else
3033
#define LUA_MEM_SIZE (11000)
34+
#endif
3135
static char lua_mem[LUA_MEM_SIZE] __attribute__ ((aligned(__BIGGEST_ALIGNMENT__)));
3236

3337
int lua_run_script(const uint8_t *buffer, size_t buffer_len)

tests/pkg/lua_loader/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ const size_t lua_riot_builtin_lua_table_len =
6969
const size_t lua_riot_builtin_c_table_len =
7070
ARRAY_SIZE(_lua_riot_builtin_c_table);
7171

72+
#if (__SIZEOF_POINTER__ == 8)
73+
#define LUA_MEM_SIZE (22000)
74+
#else
7275
#define LUA_MEM_SIZE (11000)
76+
#endif
7377
static char lua_mem[LUA_MEM_SIZE] __attribute__ ((aligned(__BIGGEST_ALIGNMENT__)));
7478

7579
#define LINEBUF_SZ (32)

0 commit comments

Comments
 (0)