source: src/examples/gc_no_raii/test/badlll.c @ f1e42c1

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since f1e42c1 was f1e42c1, checked in by Thierry Delisle <tdelisle@…>, 8 years ago

added some basic tests and modified compilation to support them

  • Property mode set to 100644
File size: 284 bytes
Line 
1#include "gc.h"
2
3struct List_t
4{
5        gcpointer(List_t) next;
6        int val;
7};
8
9typedef gcpointer(List_t) LLL;
10
11#define MAX (1024 * 1024)
12
13LLL buildLLL(int sz)
14{
15        int i;
16        LLL ll0, lll, llc;
17        ctor(&ll0);
18        ctor(&lll);
19        ctor(&llc);
20
21        ll0 = gcmalloc();
22        ll0->val = 0;
23        lll = ll0;
24
25        return ll0;
26}
Note: See TracBrowser for help on using the repository browser.