This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: nio package and asynchronous io
- From: Nic Ferrier <nferrier at tapsellferrier dot co dot uk>
- To: Jakob Praher <praher dot keg at liwest dot at>
- Cc: java at gcc dot gnu dot org
- Date: 04 Feb 2002 19:09:04 +0000
- Subject: Re: nio package and asynchronous io
- References: <1012842846.637.9.camel@jaques><87ofj54045.fsf@tf1.tapsellferrier.co.uk><1012843643.1451.12.camel@jaques><87it9d3zbe.fsf@tf1.tapsellferrier.co.uk><1012847493.1450.14.camel@jaques>
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