in, instead of using curproc). While there add an optional size argument to stackgap_init.
is needed by acad (it exec's swap -l to check if swap is enabled)