two directbuffer have same address?
Alan.Bateman at Sun.COM
Fri Dec 21 00:41:35 PST 2007
zhang Jackie wrote:
> I am using directbuffer and JNI to build a high speed network
> library. But When I use the directbuffer, I found some directbuffers
> have the same memory address(got by GetDirectBufferAddress method). I
> think the memory allocation of directbuffer is not reasonable enough.
> Can someoen give me some advice, Thanks
This has happen when you duplicate a byte buffer. Another possibility is
JNI code that allocates more than one direct byte buffer referring to
the same memory region. If you can elaborate further then this might
become clear (although the forums might be a better place to seek help).
More information about the core-libs-dev