runtime: Fixes for Alpha.

From-SVN: r204551
This commit is contained in:
Ian Lance Taylor 2013-11-07 23:38:47 +00:00
parent 50c7654b96
commit f671b58945
2 changed files with 4 additions and 1 deletions

View File

@ -68,6 +68,7 @@ runtime_MHeap_Init(MHeap *h)
void
runtime_MHeap_MapSpans(MHeap *h)
{
uintptr pagesize;
uintptr n;
// Map spans array, PageSize at a time.
@ -76,6 +77,8 @@ runtime_MHeap_MapSpans(MHeap *h)
n -= (uintptr)h->arena_start;
n = n / PageSize * sizeof(h->spans[0]);
n = ROUND(n, PageSize);
pagesize = getpagesize();
n = ROUND(n, pagesize);
if(h->spans_mapped >= n)
return;
runtime_SysMap((byte*)h->spans + h->spans_mapped, n - h->spans_mapped, &mstats.other_sys);

View File

@ -2098,7 +2098,7 @@ runtime_malg(int32 stacksize, byte** ret_stack, size_t* ret_stacksize)
__splitstack_block_signals_context(&newg->stack_context[0],
&dont_block_signals, nil);
#else
*ret_stack = runtime_mallocgc(stacksize, FlagNoProfiling|FlagNoGC, 0, 0);
*ret_stack = runtime_mallocgc(stacksize, 0, FlagNoProfiling|FlagNoGC);
*ret_stacksize = stacksize;
newg->gcinitial_sp = *ret_stack;
newg->gcstack_size = stacksize;