diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2005-06-21 12:27:36 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2005-06-21 12:27:36 +0000 |
commit | 0764b7a87516877681ef6c3fa068fe4fc4cbf2f8 (patch) | |
tree | 7afafaf397a9fc7db9da69c62466d82d3a4083d1 | |
parent | 9b19d5b87615a14910f1ca2e7960fce442c3d8be (diff) | |
download | ocaml-0764b7a87516877681ef6c3fa068fe4fc4cbf2f8.tar.gz |
fuite de pointeur sur backtrace_last_exn
git-svn-id: http://caml.inria.fr/svn/ocaml/version/3.08@6918 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/threads/scheduler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/otherlibs/threads/scheduler.c b/otherlibs/threads/scheduler.c index a25ed7cfc8..fb62442d74 100644 --- a/otherlibs/threads/scheduler.c +++ b/otherlibs/threads/scheduler.c @@ -64,7 +64,7 @@ /* Configuration */ -/* Initial size of stack when a thread is created (4 Ko) */ +/* Initial size of stack when a thread is created (4kB) */ #define Thread_stack_size (Stack_size / 4) /* Max computation time before rescheduling, in microseconds (50ms) */ @@ -174,7 +174,7 @@ value thread_initialize(value unit) /* ML */ curr_thread->trapsp = trapsp; curr_thread->backtrace_pos = Val_int(backtrace_pos); curr_thread->backtrace_buffer = backtrace_buffer; - curr_thread->backtrace_last_exn = backtrace_last_exn; + caml_initialize (&curr_thread->backtrace_last_exn, backtrace_last_exn); curr_thread->status = RUNNABLE; curr_thread->fd = Val_int(0); curr_thread->readfds = NO_FDS; @@ -311,7 +311,7 @@ static value schedule_thread(void) curr_thread->trapsp = trapsp; curr_thread->backtrace_pos = Val_int(backtrace_pos); curr_thread->backtrace_buffer = backtrace_buffer; - curr_thread->backtrace_last_exn = backtrace_last_exn; + caml_modify (&curr_thread->backtrace_last_exn, backtrace_last_exn); try_again: /* Find if a thread is runnable. |