Examples of toWord()


Examples of org.vmmagic.unboxed.Extent.toWord()

        final Extent size = endPtr.toWord().sub(startPtr.toWord()).toExtent();
        Unsafe.debug("Size     : ");
        Unsafe.debug(size);
        Unsafe.debug('\n');

        blockCount = size.toWord().rshl(BLOCK_SIZE_SHIFT);
        // Create a lock (4 bytes) and usage bitmap at the front of the memory
        // region
        final Extent rawBitmapSize = blockCount.rshl(3).toExtent();
        // final long rawBitmapSize = blockCount;
        final Extent bitmapSize = blockAlign(rawBitmapSize.toWord().add(4), true).toExtent();
View Full Code Here

Examples of org.vmmagic.unboxed.Extent.toWord()

        bitmapPtr = startPtr.add(4);
        // Clear the lock & bitmap size
        clear(lockPtr, bitmapSize);
        // Now shift the startptr.
        startPtr = startPtr.add(bitmapSize);
        blockCount = blockCount.sub(bitmapSize.toWord().rshl(BLOCK_SIZE_SHIFT));
        allocatedBlocks = Word.zero();
        // Mark as initialized
        initialized = true;

        // Unsafe.debug("BitmapPtr ");
View Full Code Here

Examples of org.vmmagic.unboxed.Extent.toWord()

     */
    private static MemoryResource loadInitJar(ResourceManager rm) {
        final Address start = Unsafe.getInitJarStart();
        final Address end = Unsafe.getInitJarEnd();
        final Extent size = end.toWord().sub(start.toWord()).toExtent();
        if (size.toWord().isZero()) {
            // No initial jarfile
            BootLogInstance.get().info("No initial jarfile found");
            return null;
        } else {
            BootLogInstance.get().info("Found initial jarfile of " + size.toInt() + 'b');
View Full Code Here

Examples of org.vmmagic.unboxed.Offset.toWord()

            }
            // We found an existing child, skip over that.
            offset = existingChild.getOffset().add(existingChild.getSize());

            // Align the new offset
            if (!offset.toWord().and(alignMask).isZero()) {
                offset = offset.toWord().add(alignMask).and(alignMask.not()).toOffset();
            }

            // Do we have space left?
            if (offset.toWord().add(size).GT(this.size.toWord())) {
View Full Code Here

Examples of org.vmmagic.unboxed.Offset.toWord()

            // We found an existing child, skip over that.
            offset = existingChild.getOffset().add(existingChild.getSize());

            // Align the new offset
            if (!offset.toWord().and(alignMask).isZero()) {
                offset = offset.toWord().add(alignMask).and(alignMask.not()).toOffset();
            }

            // Do we have space left?
            if (offset.toWord().add(size).GT(this.size.toWord())) {
                throw new ResourceNotFreeException();
View Full Code Here

Examples of org.vmmagic.unboxed.Offset.toWord()

            if (!offset.toWord().and(alignMask).isZero()) {
                offset = offset.toWord().add(alignMask).and(alignMask.not()).toOffset();
            }

            // Do we have space left?
            if (offset.toWord().add(size).GT(this.size.toWord())) {
                throw new ResourceNotFreeException();
            }
        }
    }
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.