-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize memory handling in conversion function
Handling memory in this function is almost a Catch-22 between too many mallocs and frees fragmenting memory in systems with bad allocators and string concatenations abusing the Lua garbage collector. To avoid this, now it uses a static buffer in the stack and a luaL_Buffer to handle the concatenations. This remove all direct calls to memory allocators from the library and lets Lua use its own.
- Loading branch information
Showing
1 changed file
with
18 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters