Skip to content

Instantly share code, notes, and snippets.

default split default/split
ahcbench 5.52 6.25 0.88
bh 4.82 5.66 0.85
binarytree 2.16 2.92 0.74
bisort 21.33 26.21 0.81
compress 19.42 22.91 0.85
concurrentdict 4.46 5.95 0.75
db 186.86 237.25 0.79
euler 165.88 169.30 0.98
grandetracer 23.88 32.54 0.73
using System;
using System.IO;
using System.IO.Compression;
public class Program
{
static string directoryPath = ".";
public static void Main()
{
for (int i = 0; i < 10000; i++) {
@BrzVlad
BrzVlad / gist:dcee172c24cc532a02d887b96cd4704c
Created September 28, 2018 12:55
mmap/mprotect reversal
diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c
index 6297bacf704..f78807139f0 100644
--- a/mono/mini/mini-exceptions.c
+++ b/mono/mini/mini-exceptions.c
@@ -2750,12 +2750,10 @@ mono_setup_altstack (MonoJitTlsData *tls)
g_assert ((guint8*)&sa >= (guint8*)tls->stack_ovf_guard_base + tls->stack_ovf_guard_size);
- if (mono_mprotect (tls->stack_ovf_guard_base, tls->stack_ovf_guard_size, MONO_MMAP_NONE)) {
- /* mprotect can fail for the main thread stack */
public void TestEjectFromImplicitCache ()
{
WeakRef weakFirst, weakLast;
FinalizerHelpers.PerformNoPinAction ( () => {
var compilations = new List<Compilation> ();
for (int i = 0; i < ProjectCacheService.ImplicitCacheSize + 1; i++) {
compilations.Add (CSharpCompilation.Create (i.ToString ()));
using System;
public class Program {
string str = "str";
/* Nursery size 4 000 000 000 */
public const int NURSERY_SIZE = 4000000;
public const int SIZEOF_OBJECT = 24;
public const int NUM_ELEMENTS = (NURSERY_SIZE * 2 / 3)/ SIZEOF_OBJECT;
public static void Main (string[] args)
{
/* Array in major heap */
using System;
using System.Collections;
using System.Threading;
using System.Collections.Generic;
public class Foo {
static Foo resurrect;
static Foo reference;
static List<Foo> list = new List<Foo> ();