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
This commit is contained in:
Andreas Tobler 2002-01-27 23:33:35 +01:00 committed by Tom Tromey
parent 45a2b4f74e
commit 73068e369f
2 changed files with 26 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
* nogc.cc: Remove warnings.
(_Jv_GCRegisterDisappearingLink, _Jv_GCCanReclaimSoftReference):
New functions.
2002-01-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/awt/image/MemoryImageSource.java (newPixels(byte[], ColorModel,

View File

@ -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;
}