whole_func_string: function checkCallMemCost (runState, callOptions, localOpts) {
    // calculates the gas need for saving the output in memory
    subMemUsage(runState, localOpts.outOffset, localOpts.outLength)
  
    if (!callOptions.gasLimit) {
      callOptions.gasLimit = new BN(runState.gasLeft)
    }
  }
func_code_string: function checkCallMemCost (runState, callOptions, localOpts) {
    // calculates the gas need for saving the output in memory
    subMemUsage(runState, localOpts.outOffset, localOpts.outLength)
  
    if (!callOptions.gasLimit) {
      callOptions.gasLimit = new BN(runState.gasLeft)
    }
  }
func_documentation_string: checks to see if we have enough gas left for the memory reads and writes required by the CALLs