From: Not Zed Date: Sun, 26 Jan 2020 07:53:59 +0000 (+1030) Subject: Just use the ByteBuffer address to directly unmap the memory. X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=147b78b7e49661324148be23ef5e1fcfd004d97f;p=zcl Just use the ByteBuffer address to directly unmap the memory. Thanks go to Maurizio Cimadamore for the suggestion. --- diff --git a/src/notzed.zcl/classes/au/notzed/zcl/CLCommandQueue.java b/src/notzed.zcl/classes/au/notzed/zcl/CLCommandQueue.java index f878bb8..063b480 100644 --- a/src/notzed.zcl/classes/au/notzed/zcl/CLCommandQueue.java +++ b/src/notzed.zcl/classes/au/notzed/zcl/CLCommandQueue.java @@ -1343,22 +1343,6 @@ public class CLCommandQueue extends CLExtendable { } } - private MemoryAddress getMap(ByteBuffer bb) { - synchronized (maps) { - // Note this can't use a hashtable as ByteBuffer - // hashes on state like position. - for (int i=0;i