X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fsgen%2Fsgen-conf.h;h=63e922c470e0745f5e16340a858be806b08deb2b;hb=565d626c051d4a2a93ae9501a24706dbd90f227b;hp=5a0e871e22fecc779083f53fea42bc4945f6849a;hpb=ac432e4ba2f187bf6606a2a07bb87607306647b4;p=mono.git diff --git a/mono/sgen/sgen-conf.h b/mono/sgen/sgen-conf.h index 5a0e871e22f..63e922c470e 100644 --- a/mono/sgen/sgen-conf.h +++ b/mono/sgen/sgen-conf.h @@ -1,23 +1,13 @@ -/* - * sgen-conf.h: Tunable parameters and debugging switches. +/** + * \file + * Tunable parameters and debugging switches. * * Copyright 2001-2003 Ximian, Inc * Copyright 2003-2010 Novell, Inc. * Copyright 2011 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. */ #ifndef __MONO_SGENCONF_H__ #define __MONO_SGENCONF_H__ @@ -47,13 +37,6 @@ typedef mword SgenDescriptor; #define HEAVY_STAT(x) #endif -/* - * Define this to allow the user to change the nursery size by - * specifying its value in the MONO_GC_PARAMS environmental - * variable. See mono_gc_base_init for details. - */ -#define USER_CONFIG 1 - /* * The binary protocol enables logging a lot of the GC ativity in a way that is not very * intrusive and produces a compact file that can be searched using a custom tool. This @@ -190,12 +173,6 @@ typedef mword SgenDescriptor; */ #define SGEN_DEFAULT_ALLOWANCE_HEAP_SIZE_RATIO 0.33 -/* - * How much more we allow the heap to grow, relative to the allowance, while doing - * a concurrent collection, before forcing its finish. - */ -#define SGEN_DEFAULT_CONCURRENT_HEAP_ALLOWANCE_RATIO 0.25 - /* * Default ratio of memory we want to release in a major collection in relation to the the current heap size. * @@ -227,4 +204,19 @@ typedef mword SgenDescriptor; #define SGEN_CEMENT_HASH(hv) (((hv) ^ ((hv) >> SGEN_CEMENT_HASH_SHIFT)) & (SGEN_CEMENT_HASH_SIZE - 1)) #define SGEN_CEMENT_THRESHOLD 1000 +/* + * Default values for the nursery size + */ +#define SGEN_DEFAULT_NURSERY_MIN_SIZE (1 << 19) +#define SGEN_DEFAULT_NURSERY_SIZE (1 << 22) +#define SGEN_DEFAULT_NURSERY_MAX_SIZE (1 << 25) + +/* + * We are trying to keep pauses lower than this (ms). We use it for dynamic nursery + * sizing heuristics. We are keeping leeway in order to be prepared for work-load + * variations. + */ +#define SGEN_MAX_PAUSE_TIME 30 +#define SGEN_MAX_PAUSE_MARGIN 0.66f + #endif