* Updated header: Added 2006. Changed address of FSF. Changed email
[cacao.git] / src / mm / nogc.c
index ee37416049211541339227cb2fb7b793d0a01400..91071d4f06dd07e3020f2f45d6f65a7708758816 100644 (file)
@@ -1,9 +1,9 @@
 /* src/mm/nogc.c - allocates memory through malloc (no GC)
 
-   Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
-   R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
-   C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
-   Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+   J. Wenninger, Institut f. Computersprachen - TU Wien
 
    This file is part of CACAO.
 
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
 
-   Contact: cacao@complang.tuwien.ac.at
+   Contact: cacao@cacaojvm.org
 
    Authors: Christian Thalinger
 
    Changes:
 
-   $Id: nogc.c 3532 2005-11-02 13:33:26Z twisti $
+   $Id: nogc.c 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
@@ -49,7 +49,6 @@
 #include "vm/global.h"
 #include "vm/loader.h"
 #include "vm/stringlocal.h"
-#include "vm/tables.h"
 
 
 /* global stuff ***************************************************************/
@@ -87,7 +86,26 @@ void *heap_alloc_uncollectable(u4 size)
 }
 
 
-void gc_init(u4 heapmaxsize, u4 heapstartsize)
+void *nogc_realloc(void *src, s4 len1, s4 len2)
+{
+       void *p;
+
+       p = heap_allocate(len2, false, NULL);
+
+       MCOPY(p, src, u1, len1);
+
+       return p;
+}
+
+
+void heap_free(void *p)
+{
+       /* nop */
+}
+
+
+
+void nogc_init(u4 heapmaxsize, u4 heapstartsize)
 {
        heapmaxsize = ALIGN(heapmaxsize, ALIGNSIZE);
 
@@ -107,6 +125,12 @@ void gc_init(u4 heapmaxsize, u4 heapstartsize)
 }
 
 
+void gc_init(u4 heapmaxsize, u4 heapstartsize)
+{
+       /* nop */
+}
+
+
 void gc_call(void)
 {
        log_text("GC call: nothing done...");