adjusting local and global stack limits