001 /*
002 * This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 * This file is licensed to You under the Eclipse Public License (EPL);
005 * You may not use this file except in compliance with the License. You
006 * may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/eclipse-1.0.php
009 *
010 * See the COPYRIGHT.txt file distributed with this work for information
011 * regarding copyright ownership.
012 */
013 package org.jikesrvm;
014
015 import org.vmmagic.unboxed.*;
016
017 /**
018 * Constants defining heap layout constants
019 */
020 public interface HeapLayoutConstants {
021
022 /** The address of the start of the data section of the boot image. */
023 Address BOOT_IMAGE_DATA_START =
024 Address.fromIntZeroExtend( 0x57000000 );
025
026 /** The address of the start of the code section of the boot image. */
027 Address BOOT_IMAGE_CODE_START =
028 Address.fromIntZeroExtend( 0x5B000000 );
029
030 /** The address of the start of the ref map section of the boot image. */
031 Address BOOT_IMAGE_RMAP_START =
032 Address.fromIntZeroExtend( 0x5E000000 );
033
034 /** The address in virtual memory that is the highest that can be mapped. */
035 Address MAXIMUM_MAPPABLE =
036 Address.fromIntZeroExtend( 0xa0000000 );
037
038 /** The maximum boot image data size */
039 int BOOT_IMAGE_DATA_SIZE = 56<<20;
040
041 /** The maximum boot image code size */
042 int BOOT_IMAGE_CODE_SIZE = 24<<20;
043
044 /* Typical compression ratio is about 1/20 */
045 int BAD_MAP_COMPRESSION = 5; // conservative heuristic
046 int MAX_BOOT_IMAGE_RMAP_SIZE = BOOT_IMAGE_DATA_SIZE/BAD_MAP_COMPRESSION;
047
048 /** The address of the end of the data section of the boot image. */
049 Address BOOT_IMAGE_DATA_END = BOOT_IMAGE_DATA_START.plus(BOOT_IMAGE_DATA_SIZE);
050 /** The address of the end of the code section of the boot image. */
051 Address BOOT_IMAGE_CODE_END = BOOT_IMAGE_CODE_START.plus(BOOT_IMAGE_CODE_SIZE);
052 /** The address of the end of the ref map section of the boot image. */
053 Address BOOT_IMAGE_RMAP_END = BOOT_IMAGE_RMAP_START.plus(MAX_BOOT_IMAGE_RMAP_SIZE);
054 /** The address of the end of the boot image. */
055 Address BOOT_IMAGE_END = BOOT_IMAGE_RMAP_END;
056 }