https://issues.apache.org/bugzilla/show_bug.cgi?id=44769
Summary: Add ByteBuffer creation method to
org.apache.tomcat.jni.Stdlib
Product: Tomcat 6
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Native:Integration
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
Currently, org.apache.tomcat.jni.Stdlib provides only memory allocation,
deallocation and primitive access methods.
It would be much more useful if there's a method that creates a new ByteBuffer
from the memory region allocated by Stdlib.malloc(), like the following example
code:
// Stdlib.asByteBuffer(long mem, int sz)
long addr = Stdlib.malloc(1024);
ByteBuffer buf = Stdlib.asByteBuffer(addr, 1024);
Optionally exposing a method that returns the address of the ByteBuffer will be
very useful:
// Stdlib.address(ByteBuffer buf)
long addr = Stdlib.address(buf);
Stdlib.free(addr);
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]