limit depth for stack size