Skip to content

Commit

Permalink
Remove memcost
Browse files Browse the repository at this point in the history
  • Loading branch information
gianbelinche committed May 27, 2024
1 parent 63d1f43 commit a702849
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,6 @@ function checkMemOverflow(location) {
}
}

// Note, that this function can overflow. It's up to the caller to ensure that it does not.
/*function memCost(memSizeWords) -> gasCost {
// The first term of the sum is the quadratic cost, the second one the linear one.
gasCost := add(div(mul(memSizeWords, memSizeWords), 512), mul(3, memSizeWords))
}*/

// This function can overflow, it is the job of the caller to ensure that it does not.
// The argument to this function is the offset into the memory region IN BYTES.
function expandMemory(newSize) -> gasCost {
Expand Down
12 changes: 0 additions & 12 deletions system-contracts/contracts/EvmInterpreterPreprocessed.yul
Original file line number Diff line number Diff line change
Expand Up @@ -538,12 +538,6 @@ object "EVMInterpreter" {
}
}

// Note, that this function can overflow. It's up to the caller to ensure that it does not.
/*function memCost(memSizeWords) -> gasCost {
// The first term of the sum is the quadratic cost, the second one the linear one.
gasCost := add(div(mul(memSizeWords, memSizeWords), 512), mul(3, memSizeWords))
}*/

// This function can overflow, it is the job of the caller to ensure that it does not.
// The argument to this function is the offset into the memory region IN BYTES.
function expandMemory(newSize) -> gasCost {
Expand Down Expand Up @@ -3167,12 +3161,6 @@ object "EVMInterpreter" {
}
}

// Note, that this function can overflow. It's up to the caller to ensure that it does not.
/*function memCost(memSizeWords) -> gasCost {
// The first term of the sum is the quadratic cost, the second one the linear one.
gasCost := add(div(mul(memSizeWords, memSizeWords), 512), mul(3, memSizeWords))
}*/

// This function can overflow, it is the job of the caller to ensure that it does not.
// The argument to this function is the offset into the memory region IN BYTES.
function expandMemory(newSize) -> gasCost {
Expand Down

0 comments on commit a702849

Please sign in to comment.