OSDN Git Service

Update to current version of Go library (revision 94d654be2064).
[pf3gnuchains/gcc-fork.git] / libgo / runtime / go-new.c
1 /* go-new.c -- the generic go new() function.
2
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.  */
6
7 #include "go-alloc.h"
8 #include "runtime.h"
9 #include "malloc.h"
10
11 void *
12 __go_new (size_t size)
13 {
14   return runtime_mallocgc (size, 0, 1, 1);
15 }
16
17 void *
18 __go_new_nopointers (size_t size)
19 {
20   return runtime_mallocgc (size, FlagNoPointers, 1, 1);
21 }