[Tarantool-patches] [PATCH 2/3] lua/errno: shrink memory usage on error declaration
Cyrill Gorcunov
gorcunov at gmail.com
Thu Sep 17 16:51:20 MSK 2020
There is no need to allocate 32 bytes per each string,
the backend lua does copy the string internally thus
plain pointer is enough here no need to allocate redundant
memory.
Part-of #5034
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
src/lua/errno.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lua/errno.c b/src/lua/errno.c
index 3d3947e75..c0a416c11 100644
--- a/src/lua/errno.c
+++ b/src/lua/errno.c
@@ -42,7 +42,7 @@ extern char errno_lua[];
void
tarantool_lua_errno_init(struct lua_State *L)
{
- static const struct { char name[32]; int value; } elist[] = {
+ static const struct { char *name; int value; } elist[] = {
#ifdef E2BIG
{ "E2BIG", E2BIG },
--
2.26.2
More information about the Tarantool-patches
mailing list