nasa / EdsLib

CCSDS SOIS Electronic Data Sheet Tool and Library
Apache License 2.0
31 stars 12 forks source link

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

Closed jphickey closed 1 year ago

jphickey commented 1 year ago

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.