mirror of
https://github.com/golang/go
synced 2024-09-06 00:19:45 +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
|
@ -520,7 +520,7 @@ runtime·persistentalloc(uintptr size, uintptr align)
|
|||
{
|
||||
byte *p;
|
||||
|
||||
if(align) {
|
||||
if(align != 0) {
|
||||
if(align&(align-1))
|
||||
runtime·throw("persistentalloc: align is now a power of 2");
|
||||
if(align > PageSize)
|
||||
|
|
|
@ -563,7 +563,7 @@ runtime·symtabinit(void)
|
|||
// Initialize tables.
|
||||
// Memory obtained from runtime·persistentalloc() is not scanned by GC,
|
||||
// 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[nfunc].entry = (uint64)etext;
|
||||
fname = runtime·persistentalloc(nfname*sizeof fname[0], 0);
|
||||
|
|
Loading…
Reference in a new issue