Skip to content

Overflowing the memory  #37

@ben-page

Description

@ben-page

My application was intermittently overflowing the memory store.

What I discovered is that Policy_opa_malloc and Policy_opa_heap_ptr_get will automatically grow (add pages) the memory store, but _envMemory.WriteString() does not - for obvious reason.

So if FastEvaluate() is called when _dataHeapPtr is near the end of the memory store, it can overflow the store. I created a PR to simply check the memory capacity and grow as necessary.

I also noticed that the memory allocated for the initial GetData wasn't reused if different data was loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions