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
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Implement logic similar to Emscripten's sbrk function in wasm_interface. Will need to impose a max size of 1M. Also need to perform checktime after memory is grown or shrunk to ensure time allotment isn't exceeded. Function will return the offset of the new memory that can be used for the new buffer. This will be used by #129 to allocate new pages when existing buffers are exhausted.
The text was updated successfully, but these errors were encountered:
@bytemaster for the emscrypten sbrk function the return value is useful when you pass in a positive num_bytes to allocate, since it will point to the previous number of bytes, which would be the offset of the start of the new block of memory, but I'm not sure how a user could use the return value if a negative num_bytes is passed, since it will be returning the offset of the end of the buffer that is to be removed. So I am thinking that the eoslib provided function will only take positive num_bytes and only the code that returns the MemoryInstance to its original size (a single 64K page) will be able to shrink the memory. Does that make sense?
Implement logic similar to Emscripten's sbrk function in wasm_interface. Will need to impose a max size of 1M. Also need to perform checktime after memory is grown or shrunk to ensure time allotment isn't exceeded. Function will return the offset of the new memory that can be used for the new buffer. This will be used by #129 to allocate new pages when existing buffers are exhausted.
The text was updated successfully, but these errors were encountered: