firedancer
firedancer copied to clipboard
types: add API to determine worst-case heap allocs
For any given type definition and number of bytes, the deserialization requires at most n heap allocations spanning m bytes in the worst case.
fd_types should provide an API that returns this worst-case number for a given number of bytes. The purpose of this API is to allow the caller to ensure that enough heap space is available before attempting to deserialize.