mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: minor code style improvements (followup to change 9778049)
R=golang-dev, r CC=golang-dev https://golang.org/cl/9693044
This commit is contained in:
parent
b40d98562f
commit
83d4cd758c
2 changed files with 2 additions and 2 deletions
|
|
@ -520,7 +520,7 @@ runtime·persistentalloc(uintptr size, uintptr align)
|
||||||
{
|
{
|
||||||
byte *p;
|
byte *p;
|
||||||
|
|
||||||
if(align) {
|
if(align != 0) {
|
||||||
if(align&(align-1))
|
if(align&(align-1))
|
||||||
runtime·throw("persistentalloc: align is now a power of 2");
|
runtime·throw("persistentalloc: align is now a power of 2");
|
||||||
if(align > PageSize)
|
if(align > PageSize)
|
||||||
|
|
|
||||||
|
|
@ -563,7 +563,7 @@ runtime·symtabinit(void)
|
||||||
// Initialize tables.
|
// Initialize tables.
|
||||||
// Memory obtained from runtime·persistentalloc() is not scanned by GC,
|
// Memory obtained from runtime·persistentalloc() is not scanned by GC,
|
||||||
// this is fine because all pointers either point into sections of the executable
|
// this is fine because all pointers either point into sections of the executable
|
||||||
// or also obtained from persistentmalloc().
|
// or also obtained from persistentalloc().
|
||||||
func = runtime·persistentalloc((nfunc+1)*sizeof func[0], 0);
|
func = runtime·persistentalloc((nfunc+1)*sizeof func[0], 0);
|
||||||
func[nfunc].entry = (uint64)etext;
|
func[nfunc].entry = (uint64)etext;
|
||||||
fname = runtime·persistentalloc(nfname*sizeof fname[0], 0);
|
fname = runtime·persistentalloc(nfname*sizeof fname[0], 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue