Skip to content

Commit

Permalink
lua: Increased LUA_MEM_SIZE for 64 bit
Browse files Browse the repository at this point in the history
  • Loading branch information
fzi-haxel committed Jan 17, 2024
1 parent d700d13 commit 9d982f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/lua_basic/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@

#include "blob/main.lua.h"

#if (__SIZEOF_POINTER__ == 8)
#define LUA_MEM_SIZE (22000)
#else
#define LUA_MEM_SIZE (11000)
#endif
static char lua_mem[LUA_MEM_SIZE] __attribute__ ((aligned(__BIGGEST_ALIGNMENT__)));

int lua_run_script(const uint8_t *buffer, size_t buffer_len)
Expand Down
4 changes: 4 additions & 0 deletions tests/pkg/lua_loader/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ const size_t lua_riot_builtin_lua_table_len =
const size_t lua_riot_builtin_c_table_len =
ARRAY_SIZE(_lua_riot_builtin_c_table);

#if (__SIZEOF_POINTER__ == 8)
#define LUA_MEM_SIZE (22000)
#else
#define LUA_MEM_SIZE (11000)
#endif
static char lua_mem[LUA_MEM_SIZE] __attribute__ ((aligned(__BIGGEST_ALIGNMENT__)));

#define LINEBUF_SZ (32)
Expand Down

0 comments on commit 9d982f4

Please sign in to comment.