Package com.facebook.presto.jdbc.internal.jol.datamodel

Examples of com.facebook.presto.jdbc.internal.jol.datamodel.CurrentDataModel.headerSize()


                int scale = VMSupport.U.arrayIndexScale(Class.forName(data.arrayClass()));

                int instanceSize = VMSupport.align(base + (data.arrayLength()) * scale, 8);

                SortedSet<FieldLayout> result = new TreeSet<FieldLayout>();
                result.add(new FieldLayout(FieldData.create(data.arrayClass(), "length", "int"), model.headerSize(), model.sizeOf("int")));
                result.add(new FieldLayout(FieldData.create(data.arrayClass(), "<elements>", data.arrayComponentType()), base, scale * data.arrayLength()));
                return new ClassLayout(data, result, model.headerSize(), instanceSize, false);
            } catch (ClassNotFoundException e) {
                throw new IllegalStateException("Should not reach here.", e);
            }
View Full Code Here


                int instanceSize = VMSupport.align(base + (data.arrayLength()) * scale, 8);

                SortedSet<FieldLayout> result = new TreeSet<FieldLayout>();
                result.add(new FieldLayout(FieldData.create(data.arrayClass(), "length", "int"), model.headerSize(), model.sizeOf("int")));
                result.add(new FieldLayout(FieldData.create(data.arrayClass(), "<elements>", data.arrayComponentType()), base, scale * data.arrayLength()));
                return new ClassLayout(data, result, model.headerSize(), instanceSize, false);
            } catch (ClassNotFoundException e) {
                throw new IllegalStateException("Should not reach here.", e);
            }
        }

View Full Code Here

            result.add(new FieldLayout(f, f.vmOffset(), model.sizeOf(f.typeClass())));
        }

        int instanceSize;
        if (result.isEmpty()) {
            instanceSize = VMSupport.align(model.headerSize());
        } else {
            FieldLayout f = result.last();
            instanceSize = VMSupport.align(f.offset() + f.size());
        }
        return new ClassLayout(data, result, model.headerSize(), instanceSize, true);
View Full Code Here

            instanceSize = VMSupport.align(model.headerSize());
        } else {
            FieldLayout f = result.last();
            instanceSize = VMSupport.align(f.offset() + f.size());
        }
        return new ClassLayout(data, result, model.headerSize(), instanceSize, true);
    }

    @Override
    public String toString() {
        return "Current VM Layout";
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.