• Keith Randall's avatar
    runtime: mark objects in free lists as allocated and unscannable. · 2d20c0d6
    Keith Randall authored
    On the plus side, we don't need to change the bits when mallocing
    pointerless objects.  On the other hand, we need to mark objects in the
    free lists during GC.  But the free lists are small at GC time, so it
    should be a net win.
    
    benchmark                    old ns/op    new ns/op    delta
    BenchmarkMalloc8                    40           33  -17.65%
    BenchmarkMalloc16                   45           38  -15.72%
    BenchmarkMallocTypeInfo8            58           59   +0.85%
    BenchmarkMallocTypeInfo16           63           64   +1.10%
    
    R=golang-dev, rsc, dvyukov
    CC=cshapiro, golang-dev
    https://golang.org/cl/41040043
    2d20c0d6
malloc.h 16.9 KB