Merge branch 'upstream'
Former-commit-id: 31f387f36b0f84b0cd5d2fcadd6a8f0ccd874d4d
This commit is contained in:
commit
420d5aa0de
@ -1 +1 @@
|
||||
85f8eddb28634303dd6c3f91d53f2e1c3cb9fea0
|
||||
8ad559df84be122da89b65cb9128d336923c49d6
|
@ -1 +1 @@
|
||||
c36924254401a4d926e1473e452fec74eb3b281c
|
||||
c1db514920ab9b8a51ace79aa67b54f51ee2d0af
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "5.18.0.191";
|
||||
public const string MonoVersion = "5.18.0.195";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -36,6 +36,39 @@ namespace MonoTests.System {
|
||||
|
||||
[TestFixture]
|
||||
public class GCTest {
|
||||
static class FinalizerHelpers {
|
||||
private static IntPtr aptr;
|
||||
|
||||
private static unsafe void NoPinActionHelper (int depth, Action act)
|
||||
{
|
||||
// Avoid tail calls
|
||||
int* values = stackalloc int [20];
|
||||
aptr = new IntPtr (values);
|
||||
|
||||
if (depth <= 0) {
|
||||
//
|
||||
// When the action is called, this new thread might have not allocated
|
||||
// anything yet in the nursery. This means that the address of the first
|
||||
// object that would be allocated would be at the start of the tlab and
|
||||
// implicitly the end of the previous tlab (address which can be in use
|
||||
// when allocating on another thread, at checking if an object fits in
|
||||
// this other tlab). We allocate a new dummy object to avoid this type
|
||||
// of false pinning for most common cases.
|
||||
//
|
||||
new object ();
|
||||
act ();
|
||||
} else {
|
||||
NoPinActionHelper (depth - 1, act);
|
||||
}
|
||||
}
|
||||
|
||||
public static void PerformNoPinAction (Action act)
|
||||
{
|
||||
Thread thr = new Thread (() => NoPinActionHelper (128, act));
|
||||
thr.Start ();
|
||||
thr.Join ();
|
||||
}
|
||||
}
|
||||
|
||||
class MyFinalizeObject
|
||||
{
|
||||
@ -58,10 +91,9 @@ namespace MonoTests.System {
|
||||
[Test]
|
||||
public void ReRegisterForFinalizeTest ()
|
||||
{
|
||||
var thread = new Thread (Run_ReRegisterForFinalizeTest);
|
||||
thread.Start ();
|
||||
thread.Join ();
|
||||
|
||||
FinalizerHelpers.PerformNoPinAction (delegate () {
|
||||
Run_ReRegisterForFinalizeTest ();
|
||||
});
|
||||
var t = Task.Factory.StartNew (() => {
|
||||
do {
|
||||
GC.Collect ();
|
||||
|
@ -1 +1 @@
|
||||
4730c44f098a052d27632a5bfe2304ee4d3af913
|
||||
141796699f6678ab117b739913198e7427aabee6
|
@ -1 +1 @@
|
||||
10b482b579b3b06f78940ab3f5690d40ad6dd7f8
|
||||
9e57699daed5253347c81fc9ac94063c6ef5da21
|
@ -1 +1 @@
|
||||
3b5c3c6a6fa41d6d2e8207e6deba4e15e54416e7
|
||||
f7e6a79e42edc89d8332c59207c0abf3e4fbd586
|
Binary file not shown.
@ -1 +1 @@
|
||||
a98b92266d1c0e161957995b6f2c254d175ff5d7
|
||||
527b70519ee6a1edecd78fb6be22efd086db41a8
|
@ -1 +1 @@
|
||||
2ef73fd0e9d4df583428d687a2d980e16926f1dc
|
||||
e199ddda93a03d83f98e641029684dfffc691e7d
|
@ -1 +1 @@
|
||||
4a3c4cffbd791d9c1a379923de144c08d79a0bdf
|
||||
59fde8209c4b2e1e17a9cb3d48a1837645d88129
|
@ -1 +1 @@
|
||||
b44dbf80dd8f12052dbc6683043e9777ad7847dd
|
||||
9f08a69a564caed7da24614fa8830a118e50bb34
|
@ -1 +1 @@
|
||||
4730c44f098a052d27632a5bfe2304ee4d3af913
|
||||
141796699f6678ab117b739913198e7427aabee6
|
@ -1 +1 @@
|
||||
10b482b579b3b06f78940ab3f5690d40ad6dd7f8
|
||||
9e57699daed5253347c81fc9ac94063c6ef5da21
|
@ -1 +1 @@
|
||||
3b5c3c6a6fa41d6d2e8207e6deba4e15e54416e7
|
||||
f7e6a79e42edc89d8332c59207c0abf3e4fbd586
|
Binary file not shown.
@ -1 +1 @@
|
||||
a98b92266d1c0e161957995b6f2c254d175ff5d7
|
||||
527b70519ee6a1edecd78fb6be22efd086db41a8
|
@ -1 +1 @@
|
||||
2ef73fd0e9d4df583428d687a2d980e16926f1dc
|
||||
e199ddda93a03d83f98e641029684dfffc691e7d
|
@ -1 +1 @@
|
||||
4a3c4cffbd791d9c1a379923de144c08d79a0bdf
|
||||
59fde8209c4b2e1e17a9cb3d48a1837645d88129
|
@ -1 +1 @@
|
||||
b44dbf80dd8f12052dbc6683043e9777ad7847dd
|
||||
9f08a69a564caed7da24614fa8830a118e50bb34
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user