Java: Avoid OOM error when running 'make test'
We need to garbage collect between iterations of the outside loop in bufSizeTest() in order to avoid exhausting the heap when running with Java 6 (which is still used on Linux to test the 32-bit version of libjpeg-turbo in automated builds.)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2015 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2016 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -892,6 +892,9 @@ public class TJUnitTest {
|
||||
else
|
||||
tjc.compress(dstBuf, 0);
|
||||
}
|
||||
dstImage = null;
|
||||
dstBuf = null;
|
||||
System.gc();
|
||||
}
|
||||
}
|
||||
System.out.println("Done. ");
|
||||
|
||||
Reference in New Issue
Block a user