@@ -110,6 +110,8 @@ procedure TMethodCallbackTest.Teardown;
110
110
end ;
111
111
112
112
procedure TMethodCallbackTest.TestBug01 ;
113
+ const
114
+ AllocCount = { $IFDEF CPUX64} 51 { $ELSE} 90 { $ENDIF} ;
113
115
var
114
116
i: integer;
115
117
ptr, ptr1, ptr2: Pointer;
@@ -142,7 +144,7 @@ procedure TMethodCallbackTest.TestBug01;
142
144
143
145
CheckEquals(0 , CodeMemPageCount);
144
146
145
- for i:=1 to 90 do
147
+ for i:=1 to AllocCount do
146
148
ptr:=GetCallBack(fTestObj, @TTestObj.ThreeArgCdeclProcedure, 5 , ctCdecl);
147
149
148
150
// there should still be 1 page allocated
@@ -242,6 +244,8 @@ procedure TMethodCallbackTest.TestFourArgStdFunction;
242
244
end ;
243
245
244
246
procedure TMethodCallbackTest.TestMemoryMgmt ;
247
+ const
248
+ AllocCount = { $IFDEF CPUX64} 101 { $ELSE} 110 { $ENDIF} ;
245
249
var
246
250
i: integer;
247
251
ptr, ptr1, ptr2: Pointer;
@@ -253,7 +257,7 @@ procedure TMethodCallbackTest.TestMemoryMgmt;
253
257
254
258
CheckEquals(0 , CodeMemPageCount);
255
259
256
- for i:=1 to 110 do
260
+ for i:=1 to AllocCount do
257
261
ptr:=GetCallBack(fTestObj, @TTestObj.ThreeArgCdeclProcedure, 3 , ctCdecl);
258
262
259
263
// there should still be 1 page allocated
0 commit comments