Gurobi 9.5 MemLimit usage

On Gurobi 9.5, this gives me a return code of 10003 and a message of "Unable to modify parameter MemLimit after environment started".
This is consistent with the documentation linked above:

This parameter must be set when the Gurobi environment is first created. You will need to create an empty environment, set the parameter, and then start the environment.

The best option is to put a file called gurobi.env in the working directory that has contents like:

# Gurobi configuration file
MemLimit 1.0
Threads  8
TimeLimit 600

There is something going on, though, with

since I’ve also observed that

julia> get_optimizer_attribute(model, "MemLimit")
1.0e100

but

julia> x = Ref{Cdouble}();
julia> Gurobi.GRBgetdblparam(env, "MemLimit", x)
0

julia> x[]
1.0