📄 main.h
字号:
/*******************************************************************************
* Modification Notice:
* --------------------------
* This software is modified by MediaTek Inc. and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2001
*
*******************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
*
*
* Project:
* --------
* Maui_Software
*
* Description:
* ------------
*
*
* Author:
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
/*
* Copyright (c) 1998-2002 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the confidential and proprietary information of Sun
* Microsystems, Inc. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Sun.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
* SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
* SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
* THIS SOFTWARE OR ITS DERIVATIVES.
*
* Use is subject to license terms.
*/
/*=========================================================================
* SYSTEM: KVM
* SUBSYSTEM: Main program; compilation options
* FILE: main.h
* OVERVIEW: Compilation options setup for fine-tuning the system
* and for enabling/disabling various execution, configuration,
* debugging, profiling and tracing options.
* AUTHOR: Antero Taivalsaari, Sun Labs
* Edited by Doug Simon 11/1998
* (and many others since then...)
*=======================================================================*/
/*=========================================================================
* This file gives the >>DEFAULT<< values for various compile time flags.
*
* Any port can override a value given in this file by either:
* - Giving it that value in its port-specific "machine_md.h" file
* - Giving it a value in a compiler-specific manner (e.g.,
* as a command line parameter in a makefile.)
*
* The preferred way of changing the values defined in this file
* is to edit the port-specific "machine_md.h" file rather than
* change the default values here.
*=======================================================================*/
/*=========================================================================
* General compilation options
*=======================================================================*/
/*
* Set this to zero if your compiler does not directly support 64-bit
* integers.
*/
#ifndef COMPILER_SUPPORTS_LONG
#define COMPILER_SUPPORTS_LONG 1
#endif
/*
* Set this to a non-zero value if your compiler requires that 64-bit
* integers be aligned on 0 mod 8 boundaries.
*/
#ifndef NEED_LONG_ALIGNMENT
#define NEED_LONG_ALIGNMENT 0
#endif
/* Set this to a non-zero value if your compiler requires that double
* precision floating-pointer numbers be aligned on 0 mod 8 boundaries.
*/
#ifndef NEED_DOUBLE_ALIGNMENT
#define NEED_DOUBLE_ALIGNMENT 0
#endif
/*=========================================================================
* General system configuration options
* (Note: many of these flags are commonly overridden from makefiles)
*=======================================================================*/
/* Indicates whether floating point operations are supported or not.
* Should be 0 in those implementations that are compliant with
* CLDC Specification 1.0.
*/
#ifndef IMPLEMENTS_FLOAT
#define IMPLEMENTS_FLOAT 1
#endif
/*
* Turns class prelinking/preloading (JavaCodeCompact) support on or off.
* If this option is on, KVM can prelink system classes into the
* virtual machine executable, speeding up VM startup considerably.
*
* Note: This flag is commonly overridden from the makefile
* in our Windows and Unix ports.
*
* Note: To generate the necessary ROM images for Palm, go to
* directory "tools/jcc", and type "gnumake palm".
*/
#ifndef ROMIZING
#define ROMIZING 1
#endif
/*
* Includes or excludes the optional Java Application Manager (JAM)
* component in the virtual machine. Refer to Porting Guide for
* details.
*
* Note: This flag is commonly overridden from the makefile
* in our Windows and Unix ports.
*/
#ifndef USE_JAM
#define USE_JAM 0
#endif
/* Indicates that this port utilizes asynchronous native functions.
* Currently, this option is supported only on Win32.
* Refer to KVM Porting Guide for details.
*/
#ifndef ASYNCHRONOUS_NATIVE_FUNCTIONS
#define ASYNCHRONOUS_NATIVE_FUNCTIONS 0
#endif
/*
* This option was introduced in KVM 1.0.4. When enabled,
* the system will include some additional code for the
* K Native Interface (KNI). Refer to the KNI Specification
* for details on KNI.
*
* Note: If you do not intend to use KNI, it is recommended
* that you turn this option off. Old-style native function
* calls will be slightly faster when this flag is turned off.
*/
#ifndef USE_KNI
#define USE_KNI 1
#endif
/*=========================================================================
* Palm-related system configuration options
*=======================================================================*/
/* This is a special feature intended mainly for the Palm and similar
* implementations with limited dynamic memory. Unix and Windows both
* have "fakeStaticMemory.c", but that is intended only to help find bugs
* in the Palm implementation.
*
* If set to a non-zero value, the implementation will try to move field
* tables, method tables, and other immutable structures from dynamic memory
* to "static memory" (storage RAM on Palm), which is easy to read but more
* difficult to write. This frees up valuable space in dynamic RAM.
*/
#ifndef USESTATIC
#define USESTATIC 0
#endif
/* Instructs KVM to use an optimization which allows KVM to allocate
* the Java heap in multiple chunks or segments. This makes it possible
* to allocate more Java heap space on memory-constrained target
* platforms such as the Palm. This option is potentially useful
* also on other target platforms with segmented memory architecture.
*/
#ifndef CHUNKY_HEAP
#define CHUNKY_HEAP 0
#endif
/* Instructs KVM to implement a compacting garbage collector
* or to disable compaction. NOTE: Currently compaction cannot
* be used on those platforms that have a segmented memory
* architecture (e.g., Palm OS).
*/
#ifndef ENABLE_HEAP_COMPACTION
#define ENABLE_HEAP_COMPACTION !CHUNKY_HEAP
#endif
/* This is a special form of ROMIZING (JavaCodeCompacting) that is used
* only by the Palm. It allows the rom'ed image to be relocatable even
* after it is built. The ROMIZING flag is commonly provided
* as a command line parameter from a makefile.
*/
#ifndef RELOCATABLE_ROM
#define RELOCATABLE_ROM 0
#endif
/*=========================================================================
* Memory allocation settings
*=======================================================================*/
/*=========================================================================
* COMMENT: The default sizes for overall memory allocation and
* resource allocation for individual threads are defined here.
*
* As a general principle, KVM allocates all the memory it needs
* upon virtual machine startup. At runtime, all memory is allocated
* from within these preallocated areas. However, note that on
* many platforms the native functions linked into the VM (e.g.,
* graphics operations) often perform dynamic memory allocation
* outside the Java heap.
*=======================================================================*/
/* The Java heap size that KVM will allocate upon virtual machine
* startup (in bytes). Note that the Palm implementation ignores
* this value and uses an alternative memory allocation strategy.
*
* Also note that this definition is commonly overridden from
* the makefile in the Windows and Unix ports.
*/
#ifndef DEFAULTHEAPSIZE
#define DEFAULTHEAPSIZE 65024 /* 0xFE00 */
#endif
/* Maximum size of the master inline cache (# of ICACHE entries)
* Remember that maximum size should not exceed 65535, because the
* length of inlined bytecode parameters is only two bytes (see cache.h).
* This macro is meaningful only if the ENABLEFASTBYTECODES option
* is turned on.
*/
#ifndef INLINECACHESIZE
#define INLINECACHESIZE 128
#endif
/* The execution stacks of Java threads in KVM grow and shrink
* at runtime. This value determines the default size of a new
* stack frame chunk when more space is needed.
*/
#ifndef STACKCHUNKSIZE
#define STACKCHUNKSIZE 128
#endif
/* The size (in bytes) of a statically allocated area that the
* virtual machine uses internally in various string operations.
* See global.h and global.c.
*/
#ifndef STRINGBUFFERSIZE
#define STRINGBUFFERSIZE 512
#endif
/*=========================================================================
* Garbage collection options
*=======================================================================*/
/*
* The following flag is for debugging. If non-zero, it'll cause a
* garbage collection to happen before every memory allocation.
* This will help find those pointers that you're forgetting to
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -