You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When kastore_gets returns an array buffer it's giving back a pointer that is owned by the kastore. After #175, all array pointers returned will be individually malloced buffers, which client code may wish to take ownership of to avoid extra copies.
We need to add a flag to kas_open() which indicates that a call to kastore_get involves the transfer of ownership of the buffer from kastore to the client. Once an item has been successfully returned to the client we set a flag on the struct saying "don't free this buffer", so that fields that are not retrieved don't result in a memory leak.
What do we call this flag? Say, KAS_GET_OWNS_ARRAY?
The text was updated successfully, but these errors were encountered:
When kastore_gets returns an array buffer it's giving back a pointer that is owned by the kastore. After #175, all array pointers returned will be individually malloced buffers, which client code may wish to take ownership of to avoid extra copies.
We need to add a flag to kas_open() which indicates that a call to
kastore_get
involves the transfer of ownership of the buffer from kastore to the client. Once an item has been successfully returned to the client we set a flag on the struct saying "don't free this buffer", so that fields that are not retrieved don't result in a memory leak.What do we call this flag? Say,
KAS_GET_OWNS_ARRAY
?The text was updated successfully, but these errors were encountered: