OSDN Git Service

* java/io/natFileDescriptorPosix.cc (open): Add O_CREAT in
[pf3gnuchains/gcc-fork.git] / libjava / nogc.cc
index 843f18f..0829671 100644 (file)
@@ -1,6 +1,6 @@
-// nogc.cc - Code to implement no GC.
+// nogc.cc - Implement null garbage collector.
 
-/* Copyright (C) 1998, 1999  Red Hat, Inc.
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -19,18 +19,30 @@ details.  */
 // Total amount of memory allocated.
 static long total = 0;
 
+#ifdef INTERPRETER
 void *
-_Jv_AllocObj (jsize size)
+_Jv_BuildGCDescr(jclass klass)
+{
+  return 0;
+}
+#endif
+
+void *
+_Jv_AllocObj (jsize size, jclass klass)
 {
   total += size;
-  return calloc (size, 1);
+  void *obj = calloc (size, 1);
+  *((_Jv_VTable **) obj) = klass->vtable;
+  return obj;
 }
 
 void *
-_Jv_AllocArray (jsize size)
+_Jv_AllocArray (jsize size, jclass klass)
 {
   total += size;
-  return calloc (size, 1);
+  void *obj = calloc (size, 1);
+  *((_Jv_VTable **) obj) = klass->vtable;
+  return obj;
 }
 
 void *
@@ -86,6 +98,16 @@ _Jv_GCSetMaximumHeapSize (size_t size)
 }
 
 void
+_Jv_DisableGC (void)
+{
+}
+
+void
+_Jv_EnableGC (void)
+{
+}
+
+void
 _Jv_InitGC (void)
 {
 }