mirror of
https://github.com/golang/go
synced 2024-11-19 11:14:47 -07:00
runtime: correct stats in SysFree
R=r CC=golang-dev https://golang.org/cl/2254047
This commit is contained in:
parent
9b62461a8f
commit
929fdd860b
@ -21,6 +21,7 @@ SysUnused(void *v, uintptr n)
|
|||||||
void
|
void
|
||||||
SysFree(void *v, uintptr n)
|
SysFree(void *v, uintptr n)
|
||||||
{
|
{
|
||||||
|
mstats.sys -= n;
|
||||||
runtime_munmap(v, n);
|
runtime_munmap(v, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ SysUnused(void *v, uintptr n)
|
|||||||
void
|
void
|
||||||
SysFree(void *v, uintptr n)
|
SysFree(void *v, uintptr n)
|
||||||
{
|
{
|
||||||
|
mstats.sys -= n;
|
||||||
runtime_munmap(v, n);
|
runtime_munmap(v, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ SysUnused(void *v, uintptr n)
|
|||||||
void
|
void
|
||||||
SysFree(void *v, uintptr n)
|
SysFree(void *v, uintptr n)
|
||||||
{
|
{
|
||||||
|
mstats.sys -= n;
|
||||||
runtime_munmap(v, n);
|
runtime_munmap(v, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ void
|
|||||||
SysFree(void *v, uintptr n)
|
SysFree(void *v, uintptr n)
|
||||||
{
|
{
|
||||||
// round to page size or else nacl prints annoying log messages
|
// round to page size or else nacl prints annoying log messages
|
||||||
|
mstats.sys -= n;
|
||||||
n = (n+NaclPage-1) & ~(NaclPage-1);
|
n = (n+NaclPage-1) & ~(NaclPage-1);
|
||||||
runtime_munmap(v, n);
|
runtime_munmap(v, n);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user