Mercurial > repos > tabletprog
diff runtime/object.c @ 78:abc6f3d644a4
Use Boehm-GC for garbage collection. Also make no_impl print on stderr rather than standard in and return a non-zero error code.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 15 Jul 2012 18:11:00 -0700 |
parents | 2a9c6eed0c70 |
children | 75dc7161c1ca |
line wrap: on
line diff
--- a/runtime/object.c Sun Jul 15 13:13:06 2012 -0700 +++ b/runtime/object.c Sun Jul 15 18:11:00 2012 -0700 @@ -2,11 +2,12 @@ #include <stdarg.h> #include <stdlib.h> #include <stddef.h> +#include <gc/gc.h> object * make_object(obj_meta * meta, void * parent, int num_props, ...) { va_list args; - object * newobj = malloc(meta->size); + object * newobj = GC_MALLOC(meta->size); newobj->meta = meta; newobj->parent = parent;