projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[sgen] Include mod union times to stats
[mono.git]
/
mono
/
sgen
/
sgen-memory-governor.c
diff --git
a/mono/sgen/sgen-memory-governor.c
b/mono/sgen/sgen-memory-governor.c
index d6c7f130f3cae7571d5524cd7cdf67c65119ce28..17fed16754ba8ba61a0e67f5c88f5c8c79870cc0 100644
(file)
--- a/
mono/sgen/sgen-memory-governor.c
+++ b/
mono/sgen/sgen-memory-governor.c
@@
-1,6
+1,6
@@
-/*
- *
sgen-memory-governor.c: When to schedule collections based on
- * memory usage.
+/*
*
+ *
\file
+ *
When to schedule collections based on
memory usage.
*
* Author:
* Rodrigo Kumpera (rkumpera@novell.com)
*
* Author:
* Rodrigo Kumpera (rkumpera@novell.com)
@@
-20,10
+20,10
@@
#include "mono/sgen/sgen-gc.h"
#include "mono/sgen/sgen-memory-governor.h"
#include "mono/sgen/sgen-gc.h"
#include "mono/sgen/sgen-memory-governor.h"
-#include "mono/sgen/sgen-
thread-pool
.h"
+#include "mono/sgen/sgen-
workers
.h"
#include "mono/sgen/sgen-client.h"
#include "mono/sgen/sgen-client.h"
-#define MIN_MINOR_COLLECTION_ALLOWANCE ((mword)(DEFAULT_NURSERY_SIZE * default_allowance_nursery_size_ratio))
+#define MIN_MINOR_COLLECTION_ALLOWANCE ((mword)(
SGEN_
DEFAULT_NURSERY_SIZE * default_allowance_nursery_size_ratio))
static SgenPointerQueue log_entries = SGEN_POINTER_QUEUE_INIT (INTERNAL_MEM_TEMPORARY);
static MonoCoopMutex log_entries_mutex;
static SgenPointerQueue log_entries = SGEN_POINTER_QUEUE_INIT (INTERNAL_MEM_TEMPORARY);
static MonoCoopMutex log_entries_mutex;
@@
-459,7
+459,7
@@
gboolean
sgen_memgov_try_alloc_space (mword size, int space)
{
if (sgen_memgov_available_free_space () < size) {
sgen_memgov_try_alloc_space (mword size, int space)
{
if (sgen_memgov_available_free_space () < size) {
- SGEN_ASSERT (4, !sgen_
thread_pool_is_thread_pool
_thread (mono_native_thread_id_get ()), "Memory shouldn't run out in worker thread");
+ SGEN_ASSERT (4, !sgen_
workers_is_worker
_thread (mono_native_thread_id_get ()), "Memory shouldn't run out in worker thread");
return FALSE;
}
return FALSE;
}
@@
-492,11
+492,11
@@
sgen_memgov_init (size_t max_heap, size_t soft_limit, gboolean debug_allowance,
max_heap = soft_limit;
}
max_heap = soft_limit;
}
- if (max_heap <
sgen_nursery_size
* 4) {
+ if (max_heap <
SGEN_DEFAULT_NURSERY_SIZE
* 4) {
sgen_env_var_error (MONO_GC_PARAMS_NAME, "Setting to minimum.", "`max-heap-size` must be at least 4 times as large as `nursery size`.");
sgen_env_var_error (MONO_GC_PARAMS_NAME, "Setting to minimum.", "`max-heap-size` must be at least 4 times as large as `nursery size`.");
- max_heap =
sgen_nursery_size
* 4;
+ max_heap =
SGEN_DEFAULT_NURSERY_SIZE
* 4;
}
}
- max_heap_size = max_heap -
sgen_nursery_size
;
+ max_heap_size = max_heap -
SGEN_DEFAULT_NURSERY_SIZE
;
if (allowance_ratio)
default_allowance_nursery_size_ratio = allowance_ratio;
if (allowance_ratio)
default_allowance_nursery_size_ratio = allowance_ratio;