nio package and asynchronous io

Nic Ferrier nferrier@tapsellferrier.co.uk
Mon Feb 4 10:59:00 GMT 2002


Jakob Praher <praher.keg@liwest.at> writes:
> the buffers are actually quite interesting: 
>> they provide a new method for dealing with blocks of memory. 
> there are buffer classes for all primitive types, like 
> java.nio.ByteBuffer, java.nio.IntBuffer, .... 
>> one of the neat things about the ByteBuffer, is that it can be told to 
> be a direct buffer, which means the memory underlying the buffer is 
> countigous allocated. 
>> buffers should help to reduce garbage production, as you can allocate 
> the memory once and reuse it. 

Yes. I looked at the buffering in 1.4. I seem to remember they added
some new bytecode instructions to facilitate handling buffers. Is that
true?
I guess they'd be new instructions to deal with contiguous memory
blocks.
I'm cross posting this to the GCJ list, because it might be
interesting to see what they say about the viability of adding this
kind of memory allocation (given that GCJ uses the boehm-gc.
Nic


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /