Annotation of OpenXM_contrib2/asir2000/gc/tests/trace_test.c, Revision 1.1
1.1 ! noro 1: #include <stdio.h>
! 2: #define GC_DEBUG
! 3: #include "gc.h"
! 4:
! 5: struct treenode {
! 6: struct treenode *x;
! 7: struct treenode *y;
! 8: } * root[10];
! 9:
! 10: struct treenode * mktree(int i) {
! 11: struct treenode * r = GC_MALLOC(sizeof(struct treenode));
! 12: if (0 == i) return 0;
! 13: r -> x = mktree(i-1);
! 14: r -> y = mktree(i-1);
! 15: return r;
! 16: }
! 17:
! 18: main()
! 19: {
! 20: int i;
! 21: for (i = 0; i < 10; ++i) {
! 22: root[i] = mktree(12);
! 23: }
! 24: GC_generate_random_backtrace();
! 25: GC_generate_random_backtrace();
! 26: GC_generate_random_backtrace();
! 27: GC_generate_random_backtrace();
! 28: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>