source: CIVL/examples/por/heap1.cvl

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 422 bytes
Line 
1#include <civlc.cvh>
2
3int *p;
4_Bool start = $false;
5$scope root = $here;
6void f(){
7 $when(start);
8 p = (int*) $malloc(root, sizeof(int));
9 h = &fh;
10 //$free(&fh, p);
11}
12
13void g(){
14 $heap gh;
15
16 $when(start);
17 h = &gh;
18 //p = (int*) $malloc(h, sizeof(int));
19 //$free(&gh, p);
20}
21
22void main(){
23 $proc ps[2];
24
25 ps[0] = $spawn f();
26 ps[1] = $spawn g();
27 start = $true;
28 $wait ps[0];
29 $wait ps[1];
30 $free(h, p);
31}
Note: See TracBrowser for help on using the repository browser.