added max-memory barrier