forked from TrueCloudLab/neoneo-go
vm: preallocate for istack
Avoid growing it in runtime.
This commit is contained in:
parent
decff2bfb9
commit
aa1da9de5a
1 changed files with 1 additions and 0 deletions
|
@ -107,6 +107,7 @@ func NewWithTrigger(t trigger.Type) *VM {
|
|||
}
|
||||
|
||||
initStack(&vm.istack, "invocation", nil)
|
||||
vm.istack.elems = make([]Element, 0, 8) // Most of invocations use one-two contracts, but they're likely to have internal calls.
|
||||
vm.estack = newStack("evaluation", &vm.refs)
|
||||
return vm
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue