source: CIVL/examples/languageFeatures/processLeak.cvl@ 96e7e5e

1.23 2.0 main test-branch
Last change on this file since 96e7e5e was 96e7e5e, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

cleaned up static fields in process state/dynamic scope; added test methods for memory/process leak checking.

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

  • Property mode set to 100644
File size: 390 bytes
Line 
1/**
2 * This example demonstrates the checking of process leak, i.e.,
3 * when the main function returns, there should be no other processes
4 * running or being blocked.
5 *
6 * Command line execution: civl verify memoryLeak.cvl
7 */
8#include<civlc.h>
9$proc mainP=$proc_null;
10
11void process(){
12 $when(mainP != $proc_null);
13 $wait(mainP);
14}
15
16void main(){
17 $spawn process();
18 mainP = $self;
19}
Note: See TracBrowser for help on using the repository browser.