From 3d0398f91544e074ed1e3c8721f6168331b5ccd4 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 10 May 2019 17:09:31 +0200 Subject: [PATCH] [monotouch-test] Don't go completely overboard when trying to fill the GC's nursery. --- tests/monotouch-test/mono/MonoWeakReferenceTest.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/monotouch-test/mono/MonoWeakReferenceTest.cs b/tests/monotouch-test/mono/MonoWeakReferenceTest.cs index 749abb0741..7ae7bcdb4f 100644 --- a/tests/monotouch-test/mono/MonoWeakReferenceTest.cs +++ b/tests/monotouch-test/mono/MonoWeakReferenceTest.cs @@ -84,7 +84,11 @@ namespace MonoTouchFixtures { Assert.That (t.Obj3, Is.Not.Null, "'t.Obj3' should not be null"); //overflow the nursery, make sure we fill it +#if __WATCHOS__ + for (int i = 0; i < 1000 * 100; ++i) // the apple watch doesn't have much memory, so try to not run into OOMs either. The nursery is 512k, so 100k objects should be more than enough to fill it. +#else for (int i = 0; i < 1000 * 1000 * 10; ++i) +#endif new OneField (); Exception ex = null;