* decl.c (compute_array_index_type): New function, split out from
[official-gcc.git] / libjava / nogc.cc
blob241fa19bfe7a6f950e4e3959c4ab5e7bef068409
1 // nogc.cc - Code to implement no GC.
3 /* Copyright (C) 1998, 1999 Cygnus Solutions
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
11 #include <config.h>
13 #include <stdio.h>
14 #include <stdlib.h>
16 #include <gcj/cni.h>
17 #include <jvm.h>
19 // Total amount of memory allocated.
20 static long total = 0;
22 void *
23 _Jv_AllocObj (jsize size)
25 total += size;
26 return calloc (size, 1);
29 void *
30 _Jv_AllocArray (jsize size)
32 total += size;
33 return calloc (size, 1);
36 void *
37 _Jv_AllocBytes (jsize size)
39 total += size;
40 return calloc (size, 1);
43 void
44 _Jv_RegisterFinalizer (void *, _Jv_FinalizerFunc *)
46 // FIXME: should actually register so that finalizers can be run on
47 // exit.
50 void
51 _Jv_RunFinalizers (void)
55 void
56 _Jv_RunAllFinalizers (void)
58 // FIXME: should still run all finalizers.
61 void
62 _Jv_RunGC (void)
66 long
67 _Jv_GCTotalMemory (void)
69 return total;
72 long
73 _Jv_GCFreeMemory (void)
75 return 0;
78 void
79 _Jv_GCSetInitialHeapSize (size_t size)
83 void
84 _Jv_GCSetMaximumHeapSize (size_t size)
88 void
89 _Jv_InitGC (void)