1
0
mirror of https://github.com/golang/go synced 2024-11-22 21:50:03 -07:00

runtime: use persistentalloc instead of SysAlloc in netpoll

Especially important for Windows because it reserves VM
only in multiple of 64k.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10138043
This commit is contained in:
Dmitriy Vyukov 2013-06-09 21:39:47 +04:00
parent 8cf7044983
commit 5290e55164

View File

@ -338,7 +338,7 @@ allocPollDesc(void)
n = 1;
// Must be in non-GC memory because can be referenced
// only from epoll/kqueue internals.
pd = runtime·SysAlloc(n*sizeof(*pd));
pd = runtime·persistentalloc(n*sizeof(*pd), 0);
for(i = 0; i < n; i++) {
pd[i].link = pollcache.first;
pollcache.first = &pd[i];