Skip to content

Commit

Permalink
* Ensure System.gc() never gets called with "org.bytedeco.javacpp.…
Browse files Browse the repository at this point in the history
…nopointergc" (issue tensorflow/java#208)
  • Loading branch information
saudet committed Mar 2, 2021
1 parent 7ad5b66 commit c1520a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Ensure `System.gc()` never gets called with "org.bytedeco.javacpp.nopointergc" ([issue tensorflow/java#208](https://github.com/tensorflow/java/issues/208))
* Add `Info.immutable` to disable generating setters for public data members ([pull #461](https://github.com/bytedeco/javacpp/pull/461))
* Map `String` to `char*` with `Charset.forName(STRING_BYTES_CHARSET)` when that macro is defined ([pull #460](https://github.com/bytedeco/javacpp/pull/460))
* Fix `Loader.ClassProperties` not always getting overridden correctly when defined multiple times
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/Pointer.java
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ protected <P extends Pointer> P deallocator(Deallocator deallocator) {
synchronized (DeallocatorThread.class) {
try {
while (count++ < maxRetries && ((maxBytes > 0 && DeallocatorReference.totalBytes + r.bytes > maxBytes)
|| (maxPhysicalBytes > 0 && lastPhysicalBytes > maxPhysicalBytes))) {
|| (maxPhysicalBytes > 0 && lastPhysicalBytes > maxPhysicalBytes)) && referenceQueue != null) {
if (logger.isDebugEnabled()) {
logger.debug("Calling System.gc() and Pointer.trimMemory() in " + this);
}
Expand Down

0 comments on commit c1520a0

Please sign in to comment.