- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I’m experimenting with cilk runtime code and I was wondering what is the last function executed before cilk runtime ends.
When I run, for example ./fib 30 in linux, what is the last function that executes in cilk runtime assuming execution went without any problems.
By last function I mean any code before cilk runtime shuts down properly after ./fib 30 has completed, maybe some sort of cleanup code or some sort of memory free-up or anything in that sort.
Thanks for the help or any hints.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're probably looking for __cilkrts_c_return_from_initial() in scheduler.c.
Note that the Cilk runtime does not do it's cleanup until __cilkrts_end_cilk() is called. If you're hunting for a leak, adding a call to __cilkrts_end_cilk() is the first thing to try. Our assumption is that you're likely to re-enter a spawning function and we can reuse the data structures, worker threads, etc. Since most applications don't call __cilkrts_end_cilk(), the resources are released by process rundown.
- Barry

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page