Skip to content

runtime: respect memory ulimit more precisely #5049

Closed
@rsc

Description

@rsc
The new mheap allocation takes 256 MB of virtual memory and the ulimit-respecting code
does not deal with that so programs running under ulimits fail. More generally, the
ulimit is used to size the heap, but we have significant memory resources outside the
heap - like goroutine stacks! - that must fall under the limit too. 

https://golang.org/cl/7672044 has an attempt at this. It mostly works, but it
fails with SIGBUS on OS X in the net/http short test. I have not yet tried it on Linux -
perhaps a gdb will be more helpful there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions