added the allocate primitive.