LuaMemory adds support manipulation of memory areas in Lua. These memories are much like Lua strings, but their contents can be modified in place and have an identity (selfness) independent from their contents. LuaMemory provides both a Lua module to manipulate memories in Lua, as wells as a C API for other libraries to add support to memories.
https://github.com/renatomaia/lua-memoryAlso, check the patch that adapt Lua standard libraries to use the LuaMemory C API and also accept memories where strings with embedded '\0' are acceptable:
https://github.com/renatomaia/lua/pull/1/files
And finally, a quick&dirty way to adapt Lua tests to check Lua standard libraries with memories:
Any contributions are very welcome.