make stack/heap buffer manager helper function inline
use helper_manage_stackheapbuf() consistently