Added support for allocating from the given stack with