diff options
author | Sven Gothel <[email protected]> | 2014-10-03 03:12:42 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-10-03 03:12:42 +0200 |
commit | a7a3d5ab98ee0ad33fdef50bf081afeb8295ebe4 (patch) | |
tree | 8316bb60b02dfa3d1a61aed6640afeaaeab99c13 /make/scripts | |
parent | 00a9ee70054872712017b5a14b19aa92068c8420 (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 'make/scripts')
-rwxr-xr-x | make/scripts/runtest-x64.bat | 4 | ||||
-rwxr-xr-x | make/scripts/runtest.sh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/make/scripts/runtest-x64.bat b/make/scripts/runtest-x64.bat index 4453427..3c19998 100755 --- a/make/scripts/runtest-x64.bat +++ b/make/scripts/runtest-x64.bat @@ -14,5 +14,5 @@ REM scripts\java-win64.bat com.jogamp.common.net.TestUri02Composing REM scripts\java-win64.bat com.jogamp.common.net.TestUri03Resolving REM scripts\java-win64.bat com.jogamp.common.net.TestUri99LaunchOnReservedCharPathBug908 -REM scripts\java-win32.bat com.jogamp.common.nio.TestByteBufferInputStream -scripts\java-win32.bat com.jogamp.common.nio.TestByteBufferOutputStream +REM scripts\java-win64.bat com.jogamp.common.nio.TestByteBufferInputStream +scripts\java-win64.bat com.jogamp.common.nio.TestByteBufferOutputStream diff --git a/make/scripts/runtest.sh b/make/scripts/runtest.sh index 778fa62..ed8cb8d 100755 --- a/make/scripts/runtest.sh +++ b/make/scripts/runtest.sh @@ -124,8 +124,8 @@ function onetest() { #onetest com.jogamp.common.nio.TestPointerBufferEndian 2>&1 | tee -a $LOG #onetest com.jogamp.common.nio.TestStructAccessorEndian 2>&1 | tee -a $LOG #onetest com.jogamp.common.nio.TestByteBufferInputStream 2>&1 | tee -a $LOG -#onetest com.jogamp.common.nio.TestByteBufferOutputStream 2>&1 | tee -a $LOG -onetest com.jogamp.common.nio.TestByteBufferCopyStream 2>&1 | tee -a $LOG +onetest com.jogamp.common.nio.TestByteBufferOutputStream 2>&1 | tee -a $LOG +#onetest com.jogamp.common.nio.TestByteBufferCopyStream 2>&1 | tee -a $LOG #onetest com.jogamp.common.os.TestElfReader01 2>&1 | tee -a $LOG #onetest com.jogamp.gluegen.PCPPTest 2>&1 | tee -a $LOG #onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG |