aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/malloc.c')
-rw-r--r--src/runtime/malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/malloc.c b/src/runtime/malloc.c
index d5f2b9ab80..60d20a992d 100644
--- a/src/runtime/malloc.c
+++ b/src/runtime/malloc.c
@@ -335,7 +335,7 @@ static void*
cnew(Type *typ, intgo n)
{
if(n < 0 || (typ->size > 0 && n > MaxMem/typ->size))
- runtime·panicstring("runtime: allocation size out of range");
+ runtime·throw("runtime: allocation size out of range");
return runtime·mallocgc(typ->size*n, typ, typ->kind&KindNoPointers ? FlagNoScan : 0);
}