aboutsummaryrefslogtreecommitdiff
path: root/libjava/nogc.cc
diff options
context:
space:
mode:
authorAndreas Tobler <a.tobler@schweiz.ch>2002-01-27 23:33:35 +0100
committerTom Tromey <tromey@gcc.gnu.org>2002-01-27 22:33:35 +0000
commit73068e369ffca55c491c6c519e7824eeb5011489 (patch)
tree5b6f63c599732df179d06038a98d323224f71f58 /libjava/nogc.cc
parent45a2b4f74e9bc5335b6a5be36329b49bf2efa2d6 (diff)
downloadgcc-73068e369ffca55c491c6c519e7824eeb5011489.zip
gcc-73068e369ffca55c491c6c519e7824eeb5011489.tar.gz
gcc-73068e369ffca55c491c6c519e7824eeb5011489.tar.bz2
nogc.cc: Remove warnings.
2002-01-26 Andreas Tobler <a.tobler@schweiz.ch> * nogc.cc: Remove warnings. (_Jv_GCRegisterDisappearingLink, _Jv_GCCanReclaimSoftReference): New functions. From-SVN: r49273
Diffstat (limited to 'libjava/nogc.cc')
-rw-r--r--libjava/nogc.cc28
1 files changed, 20 insertions, 8 deletions
diff --git a/libjava/nogc.cc b/libjava/nogc.cc
index 5d976ef..e81fbe1 100644
--- a/libjava/nogc.cc
+++ b/libjava/nogc.cc
@@ -1,6 +1,6 @@
// nogc.cc - Implement null garbage collector.
-/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation
This file is part of libgcj.
@@ -20,7 +20,7 @@ details. */
static long total = 0;
void *
-_Jv_BuildGCDescr(jclass klass)
+_Jv_BuildGCDescr(jclass)
{
return 0;
}
@@ -39,7 +39,7 @@ void *
_Jv_AllocPtrFreeObj (jsize size, jclass klass)
{
total += size;
- ptr_t obj = malloc (size, 1);
+ void *obj = calloc (size, 1);
if (!obj) _Jv_ThrowNoMemory();
*((_Jv_VTable **) obj) = klass->vtable;
return obj;
@@ -59,7 +59,7 @@ void *
_Jv_AllocBytes (jsize size)
{
total += size;
- ptr_t obj = calloc (size, 1);
+ void *obj = calloc (size, 1);
if (!obj) _Jv_ThrowNoMemory();
return obj;
}
@@ -112,12 +112,12 @@ _Jv_GCFreeMemory (void)
}
void
-_Jv_GCSetInitialHeapSize (size_t size)
+_Jv_GCSetInitialHeapSize (size_t)
{
}
void
-_Jv_GCSetMaximumHeapSize (size_t size)
+_Jv_GCSetMaximumHeapSize (size_t)
{
}
@@ -136,11 +136,23 @@ _Jv_InitGC (void)
{
}
+void
+_Jv_GCRegisterDisappearingLink (jobject *)
+{
+}
+
+jboolean
+_Jv_GCCanReclaimSoftReference (jobject)
+{
+ // For now, always reclaim soft references. FIXME.
+ return true;
+}
+
#ifdef JV_HASH_SYNCHRONIZATION
void *
_Jv_AllocTraceOne (jsize size /* includes vtable slot */)
{
- ptr_t obj = calloc(size, 1);
+ void *obj = calloc(size, 1);
if (!obj) _Jv_ThrowNoMemory();
return result;
}
@@ -148,7 +160,7 @@ _Jv_AllocTraceOne (jsize size /* includes vtable slot */)
void *
_Jv_AllocTraceTwo (jsize size /* includes vtable slot */)
{
- ptr_t obj = calloc(size, 1);
+ void *obj = calloc(size, 1);
if (!obj) _Jv_ThrowNoMemory();
return result;
}