OpenJDK / sumatra / sumatra-dev / scratch
view src/org/openjdk/sumatra/data/prototype/README @ 2:bc115dc339f5
Summary: minor repairs to whitespace and comments, also enhanced the factory interface slightly. Keywords: data, layout
|date||Wed, 10 Jul 2013 15:30:25 -0400|
line wrap: on
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ This is a prototype for marshalling value-like data in Java into flattened storage using reflection and Unsafe get and put. In its current state it should provide a safe, slow, and perhaps memory-leaky way to render Java data structures into a form immediately accessible from other unsafe programming languages (C and Fortran) or GPUs. Possible directions for improvement include performance enhancements (for example, custom-generated bytecodes), automatic generation of layout specifications using SWIG, using the flattened representation as the preferred storage for Java data structures (e.g., for an array of complex).