Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #29, use heap buffer for large objects in lua encode #30

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

jphickey
Copy link
Contributor

@jphickey jphickey commented Feb 1, 2023

A luaL_Buffer is limited to 8KiB, so use a heap buffer instead to ensure it is large enough to hold the object. This keeps a small local stack scratch area for small objects to avoid heap allocations for items that will fit in this, and uses the heap for everything else.

A luaL_Buffer is limited to 8KiB, so use a heap buffer instead to ensure
it is large enough to hold the object.  This keeps a small local stack
scratch area for small objects to avoid heap allocations for items that
will fit in this, and uses the heap for everything else.
@jphickey jphickey merged commit 215ff28 into nasa:main Feb 1, 2023
@jphickey jphickey deleted the fix-29-lua-large-object branch March 13, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EdsLib_LuaBinding_EncodeObject() API limited to 8KiB object size, undefined behavior if exceeded
1 participant