google / starlark-go

Starlark in Go: the Starlark configuration language, implemented in Go
BSD 3-Clause "New" or "Revised" License
2.26k stars 204 forks source link

starlark: TestProfile allocates too much #455

Closed adonovan closed 1 year ago

adonovan commented 1 year ago

The test of the profiler generates the fibonacci sequence, which rapidly allocates integers that are over 20,000 digits long, a total of about 2GB of actual RAM. If the POSIX int64 optimization is enabled, and the virtual address space has been artificially limited to only slightly more than then 4GB consumed by the optimization, then there isn't enough virtual address space left for actual RAM, so allocation fails.

We should change the test to allocate less.