]> gitweb.factorcode.org Git - factor.git/commit
Lower the stack usage of a few functions
authorSteven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>
Thu, 19 Jun 2014 20:12:25 +0000 (13:12 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 19 Jun 2014 21:55:57 +0000 (14:55 -0700)
commite6dade3f94155342b137925f300eac70d9fb8683
tree65533547b638d254123ca347da3d1de6b885eb30
parent199d6c30827ef8141e944dfaba5dc10ac8997088
Lower the stack usage of a few functions

In vm/compaction.cpp I rescoped some variables to lower the stack usage
from 592 to 560 bytes. I wasn't very successful with this. The stack
usage is larger than it looks because methods on the structures used
take an implicit this pointer and a reference to the data (so the data
has to live out it's full scope and can't be put in a register).

In vm/debug.cpp I made a large (1024 bytes) stack allocated buffer
simply dynamically allocated.

In vm/os-unix.cpp I rescoped signal handling structures to not coincide
with each other and reduced a very large (1024 bytes) amount of stack
usage to less than 500 bytes.
vm/compaction.cpp
vm/debug.cpp
vm/os-unix.cpp