• Dmitriy Vyukov's avatar
    runtime/race: lazily allocate shadow memory · 1a19f01a
    Dmitriy Vyukov authored
    Currently race detector runtime maps shadow memory eagerly at process startup.
    It works poorly on Windows, because Windows requires reservation in swap file
    (especially problematic if several Go program runs at the same, each consuming GBs
    of memory).
    With this change race detector maps shadow memory lazily, so Go runtime must notify
    about all new heap memory.
    It will help with Windows port, but also eliminates scary 16TB virtual mememory
    consumption in top output (which sometimes confuses some monitoring scripts).
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/6811085
    1a19f01a
race.h 1.04 KB