diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-05-20 00:18:15 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-05-20 00:18:15 +0000 |
commit | 9ff56c9570642711d5b7ab29920ecf5dbff14a27 (patch) | |
tree | c891bdec1e6f073f73fedeef23718bc3ac30d499 /libgo/runtime/mcache.c | |
parent | 37cb25ed7acdb844b218231130e54b8b7a0ff6e6 (diff) | |
download | gcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.zip gcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.tar.gz gcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.tar.bz2 |
Update to current version of Go library.
From-SVN: r173931
Diffstat (limited to 'libgo/runtime/mcache.c')
-rw-r--r-- | libgo/runtime/mcache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgo/runtime/mcache.c b/libgo/runtime/mcache.c index ce65757..65d849c 100644 --- a/libgo/runtime/mcache.c +++ b/libgo/runtime/mcache.c @@ -22,6 +22,8 @@ runtime_MCache_Alloc(MCache *c, int32 sizeclass, uintptr size, int32 zeroed) // Replenish using central lists. n = runtime_MCentral_AllocList(&runtime_mheap.central[sizeclass], runtime_class_to_transfercount[sizeclass], &first); + if(n == 0) + runtime_throw("out of memory"); l->list = first; l->nlist = n; c->size += n*size; |