summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/GlueGen.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-10-03 03:12:42 +0200
committerSven Gothel <[email protected]>2014-10-03 03:12:42 +0200
commita7a3d5ab98ee0ad33fdef50bf081afeb8295ebe4 (patch)
tree8316bb60b02dfa3d1a61aed6640afeaaeab99c13 /src/java/com/jogamp/gluegen/GlueGen.java
parent00a9ee70054872712017b5a14b19aa92068c8420 (diff)
MappedByteBuffer*Stream:
- Validate active and GC'ed mapped-buffer count in cleanAllSlices() via close() .. - Fix missing unmapping last buffer in notifyLengthChangeImpl(), branch criteria was off by one. - cleanSlice(..) now also issues cleanBuffer(..) on the GC'ed entry, hence if WeakReference is still alive, enforce it's release. - cleanBuffer(..) reverts FLUSH_PRE_HARD -> FLUSH_PRE_SOFT in case of an error. - flush() -> flush(boolean metaData) to expose FileChannel.force(metaData). - Add synchronous mode, flushing/syncing the mapped buffers when in READ_WRITE mapping mode and issue FileChannel.force() if not READ_ONLY. Above is implemented via flush()/flushImpl(..) for buffers and FileChannel, as well as in syncSlice(..) for buffers only. flush*()/syncSlice() is covered by: - setLength() - notifyLengthChange*(..) - nextSlice() Always issue flushImpl() in close(). - Windows: Clean all buffers in setLength(), otherwise Windows will report: - Windows: Catch MappedByteBuffer.force() IOException - Optimization of position(..) position(..) is now standalone to allow issuing flushSlice(..) before gathering the new mapped buffer. This shall avoid one extra cache miss. Hence rename positionImpl(..) -> position2(..). - All MappedByteBufferOutputStream.write(..) methods issue syncSlice(..) on the last written current slice to ensure new 'synchronous' mode is honored. +++ Unit tests: - Ensure test files are being deleted - TestByteBufferCopyStream: Reduced test file size to more sensible values. -
Diffstat (limited to 'src/java/com/jogamp/gluegen/GlueGen.java')
0 files changed, 0 insertions, 0 deletions