vmx: allocate sticky instead of more expensive fixed segment

This commit is contained in:
cinap_lenrek 2017-08-14 04:18:13 +02:00
parent 6f6df11db7
commit faae8eb752

View file

@ -347,7 +347,7 @@ mksegment(char *sn)
snprint(buf, sizeof(buf), "#g/%s/ctl", sn); snprint(buf, sizeof(buf), "#g/%s/ctl", sn);
fd = open(buf, OWRITE|OTRUNC); fd = open(buf, OWRITE|OTRUNC);
if(fd < 0) sysfatal("open: %r"); if(fd < 0) sysfatal("open: %r");
snprint(buf, sizeof(buf), "va %#ullx %#ullx fixed", 0x10000000ULL, (uvlong)sz); snprint(buf, sizeof(buf), "va %#ullx %#ullx sticky", 0x10000000ULL, (uvlong)sz);
if(write(fd, buf, strlen(buf)) < 0) sysfatal("write: %r"); if(write(fd, buf, strlen(buf)) < 0) sysfatal("write: %r");
close(fd); close(fd);
gmem = segattach(0, sn, nil, sz); gmem = segattach(0, sn, nil, sz);