harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlyd...@apache.org
Subject svn commit: r565154 - /harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/heap.h
Date Sun, 12 Aug 2007 21:22:00 GMT
Author: dlydick
Date: Sun Aug 12 14:21:59 2007
New Revision: 565154

URL: http://svn.apache.org/viewvc?view=rev&rev=565154
Log:
Use macro JVMCFG_OVERRIDE_HEAP_TYPE to define a default heap
type when defined.

Use macro CONFIG_HEAP_TYPE to declare this heap type.  Set it to
the "simple" heap type and concommitantly define the
macro CONFIG_HEAP_TYPE_SIMPLE. 

Add HEAP_INIT_REPORT and HEAP_REPORT macros.

Define prototypes for HEAP_INIT(), HEAP_INIT_REPORT(),
HEAP_REPORT(), and HEAP_SHUTDOWN().

Modified:
    harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/heap.h

Modified: harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/heap.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/heap.h?view=diff&rev=565154&r1=565153&r2=565154
==============================================================================
--- harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/heap.h (original)
+++ harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/heap.h Sun Aug 12 14:21:59 2007
@@ -11,7 +11,7 @@
  * @link jvm/src/heap_simple.c heap_simple.c@endlink
  * and @link jvm/src/heap_bimodal.c heap_bimodal.c@endlink.
  * This common header file defines the prototypes for both by way
- * of the @link #CONFIG_HEAP_TYPE_SIMPLE CONFIG_HEAP_TYPE_xxx@endlink
+ * of the @link #CONFIG_HEAP_TYPE CONFIG_HEAP_TYPE@endlink
  * symbol definition.
  *
  * Each heap allocation algorithm will have a section just like
@@ -60,6 +60,24 @@
 "$URL$",
 "$Id$");
 
+/*!
+ * @internal  For utilities that need to use
+ * @link #CONFIG_HEAP_TYPE_SIMPLE CONFIG_HEAP_TYPE_SIMPLE@endlink,
+ * the other types may be overridden and the simple heap mechanism
+ * set in place.  This is typically implemented as a compiler command
+ * line option.
+ */
+#ifdef JVMCFG_OVERRIDE_HEAP_TYPE
+
+#undef CONFIG_HEAP_TYPE
+#define CONFIG_HEAP_TYPE simple
+
+#ifndef CONFIG_HEAP_TYPE_SIMPLE
+#define CONFIG_HEAP_TYPE_SIMPLE
+#endif
+
+#endif
+
 #ifdef CONFIG_HEAP_TYPE_SIMPLE
 /*!
  * @name Simple heap model definitions
@@ -72,6 +90,8 @@
 /*@{ */ /* Begin grouped definitions */
 
 #define HEAP_INIT        heap_init_simple
+#define HEAP_INIT_REPORT heap_init_report_simple
+#define HEAP_REPORT      heap_report_simple
 #define HEAP_SHUTDOWN    heap_shutdown_simple
 #define HEAP_GET_METHOD  heap_get_method_simple
 #define HEAP_GET_STACK   heap_get_stack_simple
@@ -84,6 +104,7 @@
 /*@} */ /* End of grouped definitions */
 #endif
 
+#ifndef JVMCFG_OVERRIDE_HEAP_TYPE
 #ifdef CONFIG_HEAP_TYPE_BIMODAL
 /*!
  * @name Bimodal heap model definitions
@@ -97,6 +118,8 @@
 /*@{ */ /* Begin grouped definitions */
 
 #define HEAP_INIT        heap_init_bimodal
+#define HEAP_INIT_REPORT heap_init_report_bimodal
+#define HEAP_REPORT      heap_report_bimodal
 #define HEAP_SHUTDOWN    heap_shutdown_bimodal
 #define HEAP_GET_METHOD  heap_get_method_bimodal
 #define HEAP_GET_STACK   heap_get_stack_bimodal
@@ -108,9 +131,16 @@
 
 /*@} */ /* End of grouped definitions */
 #endif
+#endif
+
+/*************************/
+
+/* Prototypes for functions in 'heap_XXX.c' */
 
-extern rvoid HEAP_INIT(rvoid);
-extern rvoid HEAP_SHUTDOWN(rvoid);
+extern rvoid HEAP_INIT(rboolean *heap_init_flag);
+extern rvoid HEAP_INIT_REPORT(rboolean *heap_init_flag);
+extern rvoid HEAP_REPORT(rboolean *heap_init_flag);
+extern rvoid HEAP_SHUTDOWN(rboolean *heap_init_flag);
 
 extern rvoid *HEAP_GET_METHOD(rint size, rboolean clrmem_flag);
 extern rvoid *HEAP_GET_STACK(rint size, rboolean clrmem_flag);
@@ -122,6 +152,7 @@
 
 extern int  HEAP_GET_ERROR(rvoid *badptr);
 
+/*************************/
 #endif /* _heap_h_included_ */
 
 



Mime
View raw message