projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f190f9a
)
use my{Malloc,Free} in model-checking code
author
Brian Norris
<banorris@uci.edu>
Thu, 5 Apr 2012 03:14:27 +0000
(20:14 -0700)
committer
Brian Norris
<banorris@uci.edu>
Thu, 5 Apr 2012 17:05:44 +0000
(10:05 -0700)
Also, fixes 'leak' where we forgot to free the main_thread.
libthreads.cc
patch
|
blob
|
history
diff --git
a/libthreads.cc
b/libthreads.cc
index 5a4c3a12f101f33252c042f7b5daf6c19d98cca4..c0439ffa8bc60b6754bbe744b335775a5dccebc0 100644
(file)
--- a/
libthreads.cc
+++ b/
libthreads.cc
@@
-156,7
+156,7
@@
int main()
model = new ModelChecker();
- main_thread = (struct thread *)malloc(sizeof(*main_thread));
+ main_thread = (struct thread *)m
yM
alloc(sizeof(*main_thread));
create_initial_thread(main_thread);
model->add_system_thread(main_thread);
@@
-167,6
+167,7
@@
int main()
thread_wait_finish();
delete model;
+ myFree(main_thread);
DEBUG("Exiting\n");
return 0;