diff options
| author | Russ Cox <rsc@golang.org> | 2009-01-28 15:22:16 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-01-28 15:22:16 -0800 |
| commit | 9f726c2c8ba98d55935acc1143d2b792ca74e303 (patch) | |
| tree | ca165b4900d9d103778758fd1058a85d4658a235 /src/runtime/malloc.c | |
| parent | cb659ece0e9a74dd330d774552a1f26c4a4d4ee3 (diff) | |
| download | go-9f726c2c8ba98d55935acc1143d2b792ca74e303.tar.xz | |
Use explicit allspan list instead of
trying to find all the places where
spans might be recorded.
Free can cascade into complicated
span manipulations that move them
from list to list; the old code had the
possibility of accidentally processing
a span twice or jumping to a different
list, causing an infinite loop.
R=r
DELTA=70 (28 added, 25 deleted, 17 changed)
OCL=23704
CL=23710
Diffstat (limited to 'src/runtime/malloc.c')
| -rw-r--r-- | src/runtime/malloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/malloc.c b/src/runtime/malloc.c index e518b5667a..74354357c5 100644 --- a/src/runtime/malloc.c +++ b/src/runtime/malloc.c @@ -272,7 +272,7 @@ stackalloc(uint32 n) if(m->mallocing) { lock(&stacks); if(stacks.size == 0) - FixAlloc_Init(&stacks, n, SysAlloc); + FixAlloc_Init(&stacks, n, SysAlloc, nil, nil); if(stacks.size != n) { printf("stackalloc: in malloc, size=%D want %d", stacks.size, n); throw("stackalloc"); |
