summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-07 23:38:47 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-07 23:38:47 +0000
commit9526340723b83fee88aaaeb67a4b3507e265ffe6 (patch)
treec4edc5814a87f3524da04a042c7dccbbd5d29531 /libgo
parent987c72d3374e666c80a87bdd4594f511fa0dcefd (diff)
downloadgcc-9526340723b83fee88aaaeb67a4b3507e265ffe6.tar.gz
runtime: Fixes for Alpha.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r--libgo/runtime/mheap.c3
-rw-r--r--libgo/runtime/proc.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/libgo/runtime/mheap.c b/libgo/runtime/mheap.c
index 1b6cfd3dcde..62070f37943 100644
--- a/libgo/runtime/mheap.c
+++ b/libgo/runtime/mheap.c
@@ -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);
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index ab7cde43863..7011f14f8a5 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -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;