X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fsgen%2Fsgen-split-nursery.c;h=3b7ae668a203d537bd2372d15d62e7630c5db7e6;hb=855bc894db19a0810a6936729304de5591e5e5bf;hp=588651fbc0b67965c946fadc800602c16ca05b0d;hpb=e137ff6f7e2594d3ce96b4c74b528d26cc80e11d;p=mono.git diff --git a/mono/sgen/sgen-split-nursery.c b/mono/sgen/sgen-split-nursery.c index 588651fbc0b..3b7ae668a20 100644 --- a/mono/sgen/sgen-split-nursery.c +++ b/mono/sgen/sgen-split-nursery.c @@ -9,18 +9,7 @@ * Copyright 2011-2012 Xamarin Inc (http://www.xamarin.com) * Copyright (C) 2012 Xamarin Inc * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License 2.0 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License 2.0 along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Licensed under the MIT license. See LICENSE file in the project root for full license information. */ #include "config.h" @@ -265,8 +254,10 @@ alloc_for_promotion (GCVTable vtable, GCObject *obj, size_t objsize, gboolean ha int age; age = get_object_age (obj); - if (age >= promote_age) + if (age >= promote_age) { + total_promoted_size += objsize; return major_collector.alloc_object (vtable, objsize, has_references); + } /* Promote! */ ++age; @@ -276,8 +267,10 @@ alloc_for_promotion (GCVTable vtable, GCObject *obj, size_t objsize, gboolean ha age_alloc_buffers [age].next += objsize; } else { p = alloc_for_promotion_slow_path (age, objsize); - if (!p) + if (!p) { + total_promoted_size += objsize; return major_collector.alloc_object (vtable, objsize, has_references); + } } /* FIXME: assumes object layout */