Made handling of malloc and alloc uniform in two memory models.