Skip to content

Transactional values saves are not hermetic, needs audit and tests  #100

Description

@Bnaya

Every operation that requires new allocations,
We first to the allocations, and only then mutating the old state.
Example:
give this code:

const ob = createObjectBuffer({
a: 1
});
ob.a = "new string value";

When setting new value into the string value, we first save the string value,
And only then we reassign the pointer to point to the data, and update the needed ref counts.

Transactional values saves means that if we oom during save, stop the operation, free the memory allocated until that point, and as we didn't mutate anything else,
our object buffer is not stuck in any "broken" state

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions