Examples of loadByte()


Examples of org.vmmagic.unboxed.Address.loadByte()

     */
    private static final boolean isInUse(Word blockNr) {
        final Word offset = blockNr.rshl(3); // we still need a byte offset
        final int mask = (1 << blockNr.and(Word.fromIntZeroExtend(7)).toInt());
        final Address ptr = bitmapPtr.add(offset);
        final int v = ptr.loadByte() & 0xFF;
        return ((v & mask) == mask);
    }

    /**
     * Is a block identified by it blockNr [0..blockCount-1] already used.
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadByte()

    private static final void setInUse(Word blockNr, boolean inUse) {
        final Word offset = blockNr.rshl(3); // we still need a byte offset
        final int mask = (1 << blockNr.and(Word.fromIntZeroExtend(7)).toInt());
        // final int mask = (1 << blockNr);
        final Address ptr = bitmapPtr.add(offset);
        int v = ptr.loadByte();
        if (inUse) {
            v |= mask;
        } else {
            v &= ~mask;
        }
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadByte()

     */
    private final boolean isSet(Word bit) {
        final Word offset = bit.rshl(3); // we still need a byte offset
        final int mask = (1 << bit.and(Word.fromIntZeroExtend(7)).toInt());
        final Address ptr = bitmap.add(offset);
        final int v = ptr.loadByte() & 0xFF;
        return ((v & mask) == mask);
    }

    /**
     * Set/Reset a given bit.
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadByte()

    private final void set(Word bit, boolean value) {
        final Word offset = bit.rshl(3); // we still need a byte offset
        final int mask = (1 << bit.and(Word.fromIntZeroExtend(7)).toInt());
        // final int mask = (1 << blockNr);
        final Address ptr = bitmap.add(offset);
        int v = ptr.loadByte();
        if (value) {
            v |= mask;
        } else {
            v &= ~mask;
        }
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadByte()

        Unsafe.debug("\nsearching video mode 0x140 (800x600x32)...");
        Address addr = address.add(0); // clone
        int offset = -1;
        for (int i = 0; i < 4096; i++) {
            byte b1 = addr.loadByte();
            addr = addr.add(1);

            byte b2 = addr.loadByte();
            addr = addr.add(1);
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadByte()

        int offset = -1;
        for (int i = 0; i < 4096; i++) {
            byte b1 = addr.loadByte();
            addr = addr.add(1);

            byte b2 = addr.loadByte();
            addr = addr.add(1);

            if ((b1 == 0x01) && (b2 == 0x40)) {
                offset = i * 2;
                break;
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadByte()

        final int offset = addr.toWord().sub(start.toWord()).toInt();
        int bit = offset / ObjectLayout.OBJECT_ALIGN;
        final Offset idx = Offset.fromIntZeroExtend(bit / 8);
        final int mask = 1 << (bit & 7);
        final Address bitmapPtr = this.allocationBitmapPtr;
        final int value = bitmapPtr.loadByte(idx);
        return ((value & mask) == mask);
    }

    /**
     * Is the given address an address within this heap.
View Full Code Here

Examples of org.vmmagic.unboxed.Address.loadByte()

        final int offset = addr.toWord().sub(start.toWord()).toInt();
        final int bit = offset / ObjectLayout.OBJECT_ALIGN;
        final Offset idx = Offset.fromIntZeroExtend(bit / 8);
        final int mask = 1 << (bit & 7);
        final Address bitmapPtr = this.allocationBitmapPtr;
        int value = bitmapPtr.loadByte(idx);
        if (on) {
            value |= mask;
        } else {
            value &= ~mask;
        }
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.