[wasm] Implement GC support. Embedder must provide main loop pumping function request...
[mono.git] / mono / sgen / sgen-conf.h
index 63e922c470e0745f5e16340a858be806b08deb2b..47173bc29c959a8bd3ed8f1fc52c2d256959092f 100644 (file)
@@ -104,6 +104,20 @@ typedef mword SgenDescriptor;
 #endif
 #endif
 
+#if defined (HOST_WASM)
+#define DEFAULT_MAJOR SGEN_MAJOR_SERIAL
+#define DEFAULT_SWEEP_MODE SGEN_SWEEP_SERIAL
+#elif defined(HAVE_CONC_GC_AS_DEFAULT)
+/* Use concurrent major on deskstop platforms */
+#define DEFAULT_MAJOR SGEN_MAJOR_CONCURRENT
+#define DEFAULT_SWEEP_MODE SGEN_SWEEP_CONCURRENT
+#else
+#define DEFAULT_MAJOR SGEN_MAJOR_SERIAL
+#define DEFAULT_SWEEP_MODE SGEN_SWEEP_CONCURRENT
+#endif
+
+
+
 /*
  * Maximum level of debug to enable on this build.
  * Making this a constant enables us to put logging in a lot of places and
@@ -216,7 +230,16 @@ typedef mword SgenDescriptor;
  * 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
+#define SGEN_DEFAULT_MAX_PAUSE_TIME 30
+#define SGEN_DEFAULT_MAX_PAUSE_MARGIN 0.66f
+
+
+#define SGEN_PAUSE_MODE_MAX_PAUSE_MARGIN 0.5f
+
+/*
+ * In practice, for nurseries smaller than this, the parallel minor tends to be
+ * ineffective, even leading to regressions. Avoid using it for smaller nurseries.
+ */
+#define SGEN_PARALLEL_MINOR_MIN_NURSERY_SIZE (1 << 24)
 
 #endif