The doc comment for it says “Environment variables, initialized with gpa" so when I used it first time I did the following
const environ_map = init.environ_map;
defer environ_map.deinit();
But it failed …
thread 16198 panic: integer overflow
Unwind error at address `./development:0x2dc2f6` (unwind info unavailable), remaining frames may be incorrect
???:?:?: 0x3e12ff in multi_array_list.MultiArrayList(array_hash_map.Custom([ ]const u8,[ ]const u8,process.Environ.Map.EnvNameHashContext,false).Data).slice (./development)
???:?:?: 0x3e1ff0 in multi_array_list.MultiArrayList(array_hash_map.Custom([ ]const u8,[ ]const u8,process.Environ.Map.EnvNameHashContext,false).Data).items__anon_24407 (./development)
???:?:?: 0x3e1f28 in array_hash_map.Custom([ ]const u8,[ ]const u8,process.Environ.Map.EnvNameHashContext,false).keys (./development)
???:?:?: 0x3e1df6 in process.Environ.Map.keys (./development)
???:?:?: 0x44761e in process.Environ.Map.deinit (./development)
???:?:?: 0x442e83 in start.posixCallMainAndExit (./development)
???:?:?: 0x441bf1 in start.\_start (./development)
zsh: abort ./development
I removed the deinit part and it was fine(I also tried making environ_map mutable).
Another thing that added to the confusion is …
const environ = init.minimal.environ;
var environ_map = environ.createMap(gpa);
defer environ_map.deinit();
So, does it allocate?
If so, then how come that it didn’t accept an allocator parameter?
If not, then what is the significance of the part of the doc comment that says “initialized with gpa”?