WorkingDir=GC\Scenarios\DoublinkList\dlstack
Expected=0
MaxAllowedDurationSeconds=600
-Categories=EXPECTED_PASS;JITSTRESS_FAIL;15156
+Categories=EXPECTED_PASS
HostStyle=0
[Generated1222.cmd_112]
public bool runTest(int iRep, int iObj)
{
- bool success = false;
- for(int i=0; i <10; i++)
- {
- SetLink(iRep, iObj);
- MakeLeak(iRep);
- }
+ CreateDLinkListsWithLeak(iRep, iObj);
+ bool success = false;
if (DrainFinalizerQueue(iRep, iObj))
{
success = true;
}
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ // Do not inline the method that creates GC objects, because it could
+ // extend their live intervals until the end of the parent method.
+ public void CreateDLinkListsWithLeak(int iRep, int iObj)
+ {
+ for(int i=0; i <10; i++)
+ {
+ SetLink(iRep, iObj);
+ MakeLeak(iRep);
+ }
+ }
+
+
public void SetLink(int iRep, int iObj)
{
DLinkNode[] Mv_DLink;