2013-05-14 Richard Biener <rguenther@suse.de>
[official-gcc.git] / libgo / runtime / go-new.c
blobb1af5f224737b660a60e4e8b2d376149f1239422
1 /* go-new.c -- the generic go new() function.
3 Copyright 2009 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
7 #include "go-alloc.h"
8 #include "runtime.h"
9 #include "arch.h"
10 #include "malloc.h"
12 void *
13 __go_new (uintptr_t size)
15 return runtime_mallocgc (size, 0, 1, 1);
18 void *
19 __go_new_nopointers (uintptr_t size)
21 return runtime_mallocgc (size, FlagNoPointers, 1, 1);