Package org.vmmagic.unboxed

Examples of org.vmmagic.unboxed.Word.LT()


     * @return The block number of the first block, or Word.max() if not found.
     */
    private static Word findFreeBlocks(Word freeBlockCount) {
        final Word max = blockCount.sub(freeBlockCount);
        Word nr = nextBlockNr;
        while (nr.LT(max)) {
            boolean inUse = false;
            Word i;
            for (i = Word.zero(); i.LT(freeBlockCount) && (!inUse); i = i.add(1)) {
                inUse |= isInUse(nr.add(i));
            }
View Full Code Here


        final Word max = blockCount.sub(freeBlockCount);
        Word nr = nextBlockNr;
        while (nr.LT(max)) {
            boolean inUse = false;
            Word i;
            for (i = Word.zero(); i.LT(freeBlockCount) && (!inUse); i = i.add(1)) {
                inUse |= isInUse(nr.add(i));
            }
            if (!inUse) {
                // We found it
                return nr;
View Full Code Here

     * @return The bit number of the first block, or Word.max() if not found.
     */
    private final Word findFreeBits(Word freeBits) {
        final Word max = bits;
        Word nr = nextBitNr;
        while (nr.LT(max)) {
            boolean inUse = false;
            Word i;
            for (i = Word.zero(); i.LT(freeBits) && (!inUse); i = i.add(1)) {
                inUse |= isSet(nr.add(i));
            }
View Full Code Here

        final Word max = bits;
        Word nr = nextBitNr;
        while (nr.LT(max)) {
            boolean inUse = false;
            Word i;
            for (i = Word.zero(); i.LT(freeBits) && (!inUse); i = i.add(1)) {
                inUse |= isSet(nr.add(i));
            }
            if (!inUse) {
                // We found it
                return nr;
View Full Code Here


        lock();
        try {
            Address firstFreePtr = Address.zero();
            while (offset.LT(size)) {
                final Address ptr = start.add(offset);
                final Word objSize = ptr.loadWord(sizeOffset);
                final Word nextOffset = offset.add(objSize).add(headerSize);
                final Object vmt = ptr.loadObjectReference(tibOffset);
                if ((firstFreePtr == null) && (vmt == FREE)) {
View Full Code Here

                final Word nextOffset = offset.add(objSize).add(headerSize);
                final Object vmt = ptr.loadObjectReference(tibOffset);
                if ((firstFreePtr == null) && (vmt == FREE)) {
                    firstFreePtr = ptr;
                }
                if ((vmt == FREE) && (nextOffset.LT(size))) {
                    final Object nextVmt;
                    final Address nextObjectPtr = start.add(nextOffset);
                    nextVmt = nextObjectPtr.loadObjectReference(tibOffset);
                    if (nextVmt == FREE) {
                        // Combine two free spaces
View Full Code Here

        helper.clear(allocationBitmapPtr, bitmapSize);
        // Go through the heap and mark all objects in the allocation bitmap.
        final Word heapSizeW = Word.fromIntZeroExtend(heapSize);
        final Word headerSize = Word.fromIntZeroExtend(this.headerSize);
        Word offset = headerSize;
        while (offset.LT(heapSizeW)) {
            final Address ptr = start.add(offset);
            setAllocationBit(ptr, true);
            final Word objSize = ptr.loadWord(sizeOffset);
            offset = offset.add(objSize).add(headerSize);
        }
View Full Code Here

        // Go through the heap and mark all objects in the allocation bitmap.
        final Word headerSize = Word.fromIntZeroExtend(this.headerSize);
        final Offset sizeOffset = this.sizeOffset;
        final Word size = Word.fromIntZeroExtend(getSize());
        Word offset = headerSize;
        while (offset.LT(size)) {
            final Address ptr = start.add(offset);
            final Object object = ptr.toObjectReference().toObject();
            final Word flags = VmMagic.getObjectFlags(object).and(flagsMask);
            if (!flags.EQ(flagsValue) || visitor.visit(object)) {
                // Continue
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.