Loading...
You are not logged-in Login/Register





  • Posts   Search Threads
  • andresjaantackJuly 31, 2009 12:02 AM PDT   
    Why can't I see a transactional malloc()/free()?

    The release notes for the Intel STM Prototype v2.0 promise a transactional malloc() and free(). Version 3.0 promises new and delete operators, in addition. I am using v3.0 now, and my tm_safe functions do not compile because these two functions are not recognized to be transaction-safe. I'm confused.

    Does the compiler include a transactional malloc/free? If so, can you provide me with a simple example which compiles tm_safe functions that perform memory management?


    Ravi Narayanaswamy (Intel)July 31, 2009 12:28 PM PDT
    Rate
     
    Re: Why can't I see a transactional malloc()/free()?

    Quoting - andresjaantack
    The release notes for the Intel STM Prototype v2.0 promise a transactional malloc() and free(). Version 3.0 promises new and delete operators, in addition. I am using v3.0 now, and my tm_safe functions do not compile because these two functions are not recognized to be transaction-safe. I'm confused.

    Does the compiler include a transactional malloc/free? If so, can you provide me with a simple example which compiles tm_safe functions that perform memory management?

    Intel STM Prototype v3.0 does provide transactional malloc() and free().   Any time malloc and free are used in __tm_atomic region or a function marked with tm_callable attribute they are replaced with a transactional safe malloc and free.  For functions which are marked with tm_safe attribute, the compiler assumes user guarantees the safety of that function and does not replace the malloc and free.  The user has to use his own transactional safe malloc and free in this case.  Try your program by replacing tm_safe with tm_callable

Forum jump:  

Intel Software Network Forums Statistics

16,360 users have contributed to 46,328 threads and 163,790 posts to date.

In the past 24 hours, we have 41 new thread(s) 106 new posts(s), and 87 new user(s).

In the past 3 days, the most popular thread for everyone has been Formula for the intersection of straight lines The most posts were made to Take a look at John Burkhard&# The post with the most views is Intel PCM - How can I watch monitoring results of multi core of AWS CC1?

Please welcome our newest member akshoy


For more complete information about compiler optimizations, see our Optimization Notice.