From 5290e551641842151e3c86d65f42a97af2d95f9d Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Sun, 9 Jun 2013 21:39:47 +0400 Subject: [PATCH] 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 --- src/pkg/runtime/netpoll.goc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/runtime/netpoll.goc b/src/pkg/runtime/netpoll.goc index 0ab75cf0da..59420f781f 100644 --- a/src/pkg/runtime/netpoll.goc +++ b/src/pkg/runtime/netpoll.goc @@ -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]; -- 2.48.1