JDK 9 proposal: allocating ByteBuffers on heterogeneous memory

Andrew Haley aph at redhat.com
Fri Apr 1 12:59:30 UTC 2016


On 04/01/2016 09:54 AM, Attila Szegedi wrote:

> I can think of several differences. For one, you can’t presume the
> availability of a filesystem (Java doesn’t require that the host
> system give it access to a filesystem), nor the ability of the
> filesystem to expose all desired kinds of memory as files.

OK.  I have no sympathy with operating systems that can't do this, but
that's just MO.  :-)

> Next, every such solution is OS specific and we love having OS
> independent APIs in Java.

I would have thought that by definition memory with odd semantics is
OS-dependent and non-portable.

> An aspect of OS-specific functionality would also be access controls
> to these files, while with a Java API such controls can (if needed)
> be managed by Java security policy (again, in OS independent
> fashion).

Eh?  Any OS has access controls on its files.

> Finally, even if all of this is present in the system, exposing
> memory as files can be a security issue if an external process can
> also gain access to them.

Exposing memory to an external process in any way can be a security
issue.  It doesn't matter if it's a file or not.  This is irrelevant.

Andrew.



More information about the core-libs-dev mailing list