From f3dacd3c404967e0955a0612f4be8d7567f50dbc Mon Sep 17 00:00:00 2001 From: hanna Date: Wed, 27 Apr 2011 02:01:11 +0000 Subject: [PATCH] Use ByteBuffer.allocateDirect() instead of ByteBuffer.allocate(). ByteBuffer.allocateDirect() behaves like Java NIO MappedByteBuffers in that it consumes address space, which counts against our virtual memory allocation; but cannot be destroyed or otherwise freed. This was definitely contributing to the LSF failures that I was seeing, but I'm not yet convinced that it's the sole source of these virtual memory 'leaks'. More tomorrow as the results of my whole exome tests start to roll in. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5693 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/datasources/reads/BAMSchedule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/reads/BAMSchedule.java b/java/src/org/broadinstitute/sting/gatk/datasources/reads/BAMSchedule.java index 3aa88f147..a7487ba55 100644 --- a/java/src/org/broadinstitute/sting/gatk/datasources/reads/BAMSchedule.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/reads/BAMSchedule.java @@ -278,7 +278,7 @@ public class BAMSchedule implements CloseableIterator { * @return Newly allocated byte buffer. */ private ByteBuffer allocateByteBuffer(final int size) { - ByteBuffer buffer = ByteBuffer.allocateDirect(size); + ByteBuffer buffer = ByteBuffer.allocate(size); buffer.order(ByteOrder.LITTLE_ENDIAN); return buffer; }