Dolgsthrasir Dolgsthrasir - 1 year ago 130
Linux Question

Using mono's marksweep-par garbage collection

I have installed mono version on my CentOS operating system from this source by first downloading the tarball and then doing

sudo ./configure
sudo make
sudo make install
on the extracted source files.

Configure return this, which looks ok to me

Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
GC: sgen and Included Boehm GC with typed GC and parallel mark
TLS: __thread
Engine: Building and using the JIT
oprofile: no
BigArrays: no
DTrace: no
LLVM Back End: no (dynamically loaded: no)

Mono itself runs fine this way with the major collector marksweep.

But now I want to run mono with the SGen garbage collector and it's major collector marksweep-par for some tests. This is what I do according to this description:

export MONO_GC_PARAMS=major=marksweep-par
mono-sgen testApp.exe

Unfortunately mono starts with this warning

Warning: In environment variable 'MONO_GC_PARAMS': Unknown major collector 'marksweep-par'. - Using 'marksweep' instead.

Of course this is not what I want. Google did not return an answer to me when looking for this warning. Now my question is, how I can get mono to run with marksweep-par.

What am I doing wrong? Any help is appreciated.

Answer Source

You are referring to a old man page (Mono 2.5) while you are running 4.2+.

You should review the man page installed on your system:

man mono


Specifies which major collector to use. Options are marksweep for the Mark&Sweep collector, and marksweep-conc for concurrent Mark&Sweep. The non-concurrent Mark&Sweep collector is the default.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download