[kaffe] CVS kaffe (robilad): Small warning fixlet for gc-mem-c
Kaffe CVS
cvs-commits at kaffe.org
Sat Aug 20 13:15:40 PDT 2005
PatchSet 6854
Date: 2005/08/20 20:10:18
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Small warning fixlet for gc-mem-c
2005-08-20 Dalibor Topic <robilad at kaffe.org>
* kaffe/kaffevm/kaffe-gc/gc-mem.c (gc_heap_is_unlimited):
New static function.
(gc_heap_initialise, gc_heap_grow) Use gc_heap_is_unlimited.
Members:
ChangeLog:1.4376->1.4377
kaffe/kaffevm/kaffe-gc/gc-mem.c:1.31->1.32
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4376 kaffe/ChangeLog:1.4377
--- kaffe/ChangeLog:1.4376 Sat Aug 20 14:20:55 2005
+++ kaffe/ChangeLog Sat Aug 20 20:10:18 2005
@@ -1,5 +1,20 @@
2005-08-20 Dalibor Topic <robilad at kaffe.org>
+ * kaffe/kaffevm/kaffe-gc/gc-mem.c (gc_heap_is_unlimited):
+ New static function.
+ (gc_heap_initialise, gc_heap_grow) Use gc_heap_is_unlimited.
+
+2005-08-20 Dalibor Topic <robilad at kaffe.org>
+
+ * kaffe/kaffevm/jit/basecode.c,
+ kaffe/kaffevm/jit/icode.c,
+ kaffe/kaffevm/jit/machine.c,
+ kaffe/kaffevm/jit/registers.c:
+ Labelled unused parameters as UNUSED, added missing headers and
+ made variables unsigned where necessary to fix compiler warnings.
+
+2005-08-20 Dalibor Topic <robilad at kaffe.org>
+
* kaffe/kaffevm/jit/Makefile.am (AM_CPPFLAGS): Added jvmpi includes.
* kaffe/kaffevm/jit/machine.c: Include jvmpi header.
Index: kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c
diff -u kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c:1.31 kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c:1.32
--- kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c:1.31 Sun Jul 17 09:57:56 2005
+++ kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c Sat Aug 20 20:10:21 2005
@@ -233,6 +233,13 @@
#endif /* !(defined(NDEBUG) || !defined(KAFFE_VMDEBUG)) */
+
+static inline bool
+gc_heap_is_unlimited(void)
+{
+ return gc_heap_limit != UNLIMITED_HEAP;
+}
+
/*
* Initialise allocator.
*/
@@ -257,7 +264,8 @@
/*
* Perform some sanity checks.
*/
- if (gc_heap_initial_size > gc_heap_limit && gc_heap_limit != UNLIMITED_HEAP) {
+ if ((gc_heap_initial_size > gc_heap_limit)
+ && !gc_heap_is_unlimited()) {
dprintf(
"Initial heap size (%dK) > Maximum heap size (%dK)\n",
(int) (gc_heap_initial_size/1024), (int)(gc_heap_limit/1024));
@@ -1254,7 +1262,7 @@
if (gc_heap_total == gc_heap_limit) {
unlockStaticMutex(&gc_heap_lock);
return (NULL);
- } else if (gc_heap_total + sz > gc_heap_limit && gc_heap_limit != UNLIMITED_HEAP) {
+ } else if (gc_heap_total + sz > gc_heap_limit && !gc_heap_is_unlimited()) {
/* take as much memory as we can */
sz = gc_heap_limit - gc_heap_total;
assert(sz % gc_pgsize == 0);
@@ -1275,7 +1283,7 @@
}
gc_heap_total += sz;
- assert(gc_heap_total <= gc_heap_limit || gc_heap_limit == UNLIMITED_HEAP);
+ assert(gc_heap_total <= gc_heap_limit || gc_heap_is_unlimited());
/* Place block into the freelist for subsequent use */
DBG(GCDIAG, gc_set_magic_marker(blk));
More information about the kaffe
mailing list