google / starlark-go

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

Add build tag to disable small int optimization on 64bit posix systems #396

Closed aarzilli closed 2 years ago

aarzilli commented 2 years ago

Adds a new build tag, starlark_int_generic, to disable the small integer optimization on posix systems running on 64bit architecture.

This allows starlark to be used on systems with ulimits set.

Also updates the mmap error to be more helpful.

Fixes #394

adonovan commented 2 years ago

Thanks @aarzilli. I tried out the alternative approach in https://github.com/google/starlark-go/pull/398 and it doesn't seem to cost much. I think I prefer it because it encapsulates all the complexity in the interpreter.

aarzilli commented 2 years ago

Cool, happily closing this.