This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nio package and asynchronous io


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]