Package org.vmmagic.unboxed

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


        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

     */
    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

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.