allocator.h 413 B

123456789101112131415161718192021
  1. struct list {
  2. // object is a pointer into the heap
  3. // object[0] will be the GC header
  4. // object[1..] is the data
  5. scm *object;
  6. struct list *next;
  7. struct list *prev;
  8. };
  9. extern struct list *objects;
  10. void objects_push(scm *obj);
  11. scm *allocate(scm len);
  12. scm allocate_strg(char *str, scm len);
  13. scm allocate_cons(scm car, scm cdr);
  14. scm allocate_vect(scm len, scm val);
  15. scm allocate_clos(scm *lbl, scm len);