@@ -233,7 +233,7 @@ static class TestFunction extends FunctionPointer {
233
233
for (int j = 0 ; j < chunks - 1 ; j ++) {
234
234
pointers [j ] = new BytePointer (chunkSize );
235
235
}
236
- assertTrue (Pointer .totalBytes () >= (chunks - 1 ) * chunkSize * byteSize );
236
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= (chunks - 1 ) * chunkSize * byteSize );
237
237
try {
238
238
fieldReference = pointers ;
239
239
System .out .println ("Note: OutOfMemoryError should get thrown here and printed below." );
@@ -249,9 +249,9 @@ static class TestFunction extends FunctionPointer {
249
249
// make sure garbage collection runs
250
250
fieldReference = null ;
251
251
pointers [0 ] = new BytePointer (chunkSize );
252
- assertTrue (Pointer .totalBytes () < (chunks - 1 ) * chunkSize * byteSize );
253
- assertTrue (Pointer .totalBytes () >= chunkSize * byteSize );
254
- System .out .println (Pointer .totalBytes () + " " + chunkSize * byteSize );
252
+ assertTrue (Pointer .DeallocatorReference . totalBytes < (chunks - 1 ) * chunkSize * byteSize );
253
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= chunkSize * byteSize );
254
+ System .out .println (Pointer .DeallocatorReference . totalBytes + " " + chunkSize * byteSize );
255
255
}
256
256
257
257
@ Test public void testShortPointer () {
@@ -316,7 +316,7 @@ static class TestFunction extends FunctionPointer {
316
316
for (int j = 0 ; j < chunks - 1 ; j ++) {
317
317
pointers [j ] = new ShortPointer (chunkSize );
318
318
}
319
- assertTrue (Pointer .totalBytes () >= (chunks - 1 ) * chunkSize * shortSize );
319
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= (chunks - 1 ) * chunkSize * shortSize );
320
320
try {
321
321
fieldReference = pointers ;
322
322
System .out .println ("Note: OutOfMemoryError should get thrown here and printed below." );
@@ -332,9 +332,9 @@ static class TestFunction extends FunctionPointer {
332
332
// make sure garbage collection runs
333
333
fieldReference = null ;
334
334
pointers [0 ] = new ShortPointer (chunkSize );
335
- assertTrue (Pointer .totalBytes () < (chunks - 1 ) * chunkSize * shortSize );
336
- assertTrue (Pointer .totalBytes () >= chunkSize * shortSize );
337
- System .out .println (Pointer .totalBytes () + " " + chunkSize * shortSize );
335
+ assertTrue (Pointer .DeallocatorReference . totalBytes < (chunks - 1 ) * chunkSize * shortSize );
336
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= chunkSize * shortSize );
337
+ System .out .println (Pointer .DeallocatorReference . totalBytes + " " + chunkSize * shortSize );
338
338
}
339
339
340
340
@ Test public void testIntPointer () {
@@ -399,7 +399,7 @@ static class TestFunction extends FunctionPointer {
399
399
for (int j = 0 ; j < chunks - 1 ; j ++) {
400
400
pointers [j ] = new IntPointer (chunkSize );
401
401
}
402
- assertTrue (Pointer .totalBytes () >= (chunks - 1 ) * chunkSize * intSize );
402
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= (chunks - 1 ) * chunkSize * intSize );
403
403
try {
404
404
fieldReference = pointers ;
405
405
System .out .println ("Note: OutOfMemoryError should get thrown here and printed below." );
@@ -415,9 +415,9 @@ static class TestFunction extends FunctionPointer {
415
415
// make sure garbage collection runs
416
416
fieldReference = null ;
417
417
pointers [0 ] = new IntPointer (chunkSize );
418
- assertTrue (Pointer .totalBytes () < (chunks - 1 ) * chunkSize * intSize );
419
- assertTrue (Pointer .totalBytes () >= chunkSize * intSize );
420
- System .out .println (Pointer .totalBytes () + " " + chunkSize * intSize );
418
+ assertTrue (Pointer .DeallocatorReference . totalBytes < (chunks - 1 ) * chunkSize * intSize );
419
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= chunkSize * intSize );
420
+ System .out .println (Pointer .DeallocatorReference . totalBytes + " " + chunkSize * intSize );
421
421
}
422
422
423
423
@ Test public void testLongPointer () {
@@ -482,7 +482,7 @@ static class TestFunction extends FunctionPointer {
482
482
for (int j = 0 ; j < chunks - 1 ; j ++) {
483
483
pointers [j ] = new LongPointer (chunkSize );
484
484
}
485
- assertTrue (Pointer .totalBytes () >= (chunks - 1 ) * chunkSize * longSize );
485
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= (chunks - 1 ) * chunkSize * longSize );
486
486
try {
487
487
fieldReference = pointers ;
488
488
System .out .println ("Note: OutOfMemoryError should get thrown here and printed below." );
@@ -498,9 +498,9 @@ static class TestFunction extends FunctionPointer {
498
498
// make sure garbage collection runs
499
499
fieldReference = null ;
500
500
pointers [0 ] = new LongPointer (chunkSize );
501
- assertTrue (Pointer .totalBytes () < (chunks - 1 ) * chunkSize * longSize );
502
- assertTrue (Pointer .totalBytes () >= chunkSize * longSize );
503
- System .out .println (Pointer .totalBytes () + " " + chunkSize * longSize );
501
+ assertTrue (Pointer .DeallocatorReference . totalBytes < (chunks - 1 ) * chunkSize * longSize );
502
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= chunkSize * longSize );
503
+ System .out .println (Pointer .DeallocatorReference . totalBytes + " " + chunkSize * longSize );
504
504
}
505
505
506
506
@ Test public void testFloatPointer () {
@@ -565,7 +565,7 @@ static class TestFunction extends FunctionPointer {
565
565
for (int j = 0 ; j < chunks - 1 ; j ++) {
566
566
pointers [j ] = new FloatPointer (chunkSize );
567
567
}
568
- assertTrue (Pointer .totalBytes () >= (chunks - 1 ) * chunkSize * floatSize );
568
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= (chunks - 1 ) * chunkSize * floatSize );
569
569
try {
570
570
fieldReference = pointers ;
571
571
System .out .println ("Note: OutOfMemoryError should get thrown here and printed below." );
@@ -581,9 +581,9 @@ static class TestFunction extends FunctionPointer {
581
581
// make sure garbage collection runs
582
582
fieldReference = null ;
583
583
pointers [0 ] = new FloatPointer (chunkSize );
584
- assertTrue (Pointer .totalBytes () < (chunks - 1 ) * chunkSize * floatSize );
585
- assertTrue (Pointer .totalBytes () >= chunkSize * floatSize );
586
- System .out .println (Pointer .totalBytes () + " " + chunkSize * floatSize );
584
+ assertTrue (Pointer .DeallocatorReference . totalBytes < (chunks - 1 ) * chunkSize * floatSize );
585
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= chunkSize * floatSize );
586
+ System .out .println (Pointer .DeallocatorReference . totalBytes + " " + chunkSize * floatSize );
587
587
}
588
588
589
589
@ Test public void testDoublePointer () {
@@ -648,7 +648,7 @@ static class TestFunction extends FunctionPointer {
648
648
for (int j = 0 ; j < chunks - 1 ; j ++) {
649
649
pointers [j ] = new DoublePointer (chunkSize );
650
650
}
651
- assertTrue (Pointer .totalBytes () >= (chunks - 1 ) * chunkSize * doubleSize );
651
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= (chunks - 1 ) * chunkSize * doubleSize );
652
652
try {
653
653
fieldReference = pointers ;
654
654
System .out .println ("Note: OutOfMemoryError should get thrown here and printed below." );
@@ -664,9 +664,9 @@ static class TestFunction extends FunctionPointer {
664
664
// make sure garbage collection runs
665
665
fieldReference = null ;
666
666
pointers [0 ] = new DoublePointer (chunkSize );
667
- assertTrue (Pointer .totalBytes () < (chunks - 1 ) * chunkSize * doubleSize );
668
- assertTrue (Pointer .totalBytes () >= chunkSize * doubleSize );
669
- System .out .println (Pointer .totalBytes () + " " + chunkSize * doubleSize );
667
+ assertTrue (Pointer .DeallocatorReference . totalBytes < (chunks - 1 ) * chunkSize * doubleSize );
668
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= chunkSize * doubleSize );
669
+ System .out .println (Pointer .DeallocatorReference . totalBytes + " " + chunkSize * doubleSize );
670
670
}
671
671
672
672
@ Test public void testCharPointer () {
@@ -731,7 +731,7 @@ static class TestFunction extends FunctionPointer {
731
731
for (int j = 0 ; j < chunks - 1 ; j ++) {
732
732
pointers [j ] = new CharPointer (chunkSize );
733
733
}
734
- assertTrue (Pointer .totalBytes () >= (chunks - 1 ) * chunkSize * charSize );
734
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= (chunks - 1 ) * chunkSize * charSize );
735
735
try {
736
736
fieldReference = pointers ;
737
737
System .out .println ("Note: OutOfMemoryError should get thrown here and printed below." );
@@ -747,9 +747,9 @@ static class TestFunction extends FunctionPointer {
747
747
// make sure garbage collection runs
748
748
fieldReference = null ;
749
749
pointers [0 ] = new CharPointer (chunkSize );
750
- assertTrue (Pointer .totalBytes () < (chunks - 1 ) * chunkSize * charSize );
751
- assertTrue (Pointer .totalBytes () >= chunkSize * charSize );
752
- System .out .println (Pointer .totalBytes () + " " + chunkSize * charSize );
750
+ assertTrue (Pointer .DeallocatorReference . totalBytes < (chunks - 1 ) * chunkSize * charSize );
751
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= chunkSize * charSize );
752
+ System .out .println (Pointer .DeallocatorReference . totalBytes + " " + chunkSize * charSize );
753
753
}
754
754
755
755
@ Test public void testBooleanPointer () {
@@ -813,7 +813,7 @@ static class TestFunction extends FunctionPointer {
813
813
for (int j = 0 ; j < chunks - 1 ; j ++) {
814
814
pointers [j ] = new BooleanPointer (chunkSize );
815
815
}
816
- assertTrue (Pointer .totalBytes () >= (chunks - 1 ) * chunkSize * booleanSize );
816
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= (chunks - 1 ) * chunkSize * booleanSize );
817
817
try {
818
818
fieldReference = pointers ;
819
819
System .out .println ("Note: OutOfMemoryError should get thrown here and printed below." );
@@ -829,9 +829,9 @@ static class TestFunction extends FunctionPointer {
829
829
// make sure garbage collection runs
830
830
fieldReference = null ;
831
831
pointers [0 ] = new BooleanPointer (chunkSize );
832
- assertTrue (Pointer .totalBytes () < (chunks - 1 ) * chunkSize * booleanSize );
833
- assertTrue (Pointer .totalBytes () >= chunkSize * booleanSize );
834
- System .out .println (Pointer .totalBytes () + " " + chunkSize * booleanSize );
832
+ assertTrue (Pointer .DeallocatorReference . totalBytes < (chunks - 1 ) * chunkSize * booleanSize );
833
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= chunkSize * booleanSize );
834
+ System .out .println (Pointer .DeallocatorReference . totalBytes + " " + chunkSize * booleanSize );
835
835
}
836
836
837
837
@ Test public void testPointerPointer () {
@@ -904,7 +904,7 @@ static class TestFunction extends FunctionPointer {
904
904
for (int j = 0 ; j < chunks - 1 ; j ++) {
905
905
pointers [j ] = new PointerPointer (chunkSize );
906
906
}
907
- assertTrue (Pointer .totalBytes () >= (chunks - 1 ) * chunkSize * pointerSize );
907
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= (chunks - 1 ) * chunkSize * pointerSize );
908
908
try {
909
909
fieldReference = pointers ;
910
910
System .out .println ("Note: OutOfMemoryError should get thrown here and printed below." );
@@ -920,9 +920,9 @@ static class TestFunction extends FunctionPointer {
920
920
// make sure garbage collection runs
921
921
fieldReference = null ;
922
922
pointers [0 ] = new PointerPointer (chunkSize );
923
- assertTrue (Pointer .totalBytes () < (chunks - 1 ) * chunkSize * pointerSize );
924
- assertTrue (Pointer .totalBytes () >= chunkSize * pointerSize );
925
- System .out .println (Pointer .totalBytes () + " " + chunkSize * pointerSize );
923
+ assertTrue (Pointer .DeallocatorReference . totalBytes < (chunks - 1 ) * chunkSize * pointerSize );
924
+ assertTrue (Pointer .DeallocatorReference . totalBytes >= chunkSize * pointerSize );
925
+ System .out .println (Pointer .DeallocatorReference . totalBytes + " " + chunkSize * pointerSize );
926
926
}
927
927
928
928
@ Test public void testDeallocator () throws InterruptedException {
0 commit comments