-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory metering #40
Memory metering #40
Conversation
lgtm |
|
||
### Initial memory allocation | ||
|
||
Metering call needs to be injected as the very first instruction if preallocated memory pages are defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metering Calls are always injected as the very first instruction regardless if there is preallocated memory or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre-allocated memory page is defined by memory
in the module
section as opposed to opcodes in the func
section. So it is not part of what the regular metering code does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, but i think i'm confused on this part
Metering call needs to be injected as the very first instruction if preallocated memory pages are defined.
Metering costs need to be added to the first metering call. The first instruction to run is always a metering call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this is better wording:
The cost of pre-allocated memory must be included in the very first metering call.
No description provided.