Jump to content

Osci-2.3.4 using mmap instead of malloc/new


Rajni

Recommended Posts

Hi all,

It is observed that with latest upgrade osci-2.3.4 is using mmap instead of malloc/new operator that were being used in earlier versions. This change leads to performance degradation since mmap is slower than malloc. Then why has osci moved to mmap. Does anyone has any idea?

Regards,

Rajni 

Link to comment
Share on other sites

First, it is Accellera 2.3.4 since OSCI is ancient history.

This was added to allow address sanitation according to git log comments:

    This is required to make SystemC work with ASAN. The current implementation leads
    to SIGSEGV in ASAN, because it runs into the protected area at the end of the
    stack.

In other words, it supports finding bugs.

For information on ASAN see one of:

Although performance is indeed important, bug finding is often more important.

It is heavily dependent on your particular application and use of SystemC. So you may need to do substantial investigation. The blanket statement "This change leads to performance degradation since mmap is slower than malloc." is incorrect unless highly qualified. It has to do with how you use memory. Have you specifically measured its impact on your design? You can go back to the old approach to compare.

A good discussion of some of the performance issues can be found here:

You can change it back by defining ENABLE_LEGACY_MEM_MGMT when using cmake or SC_LEGACY_MEM_MGMT if using make when building the executable. Since you are asking about such low-level detail, I assume you can deal with that.

Finally, this is part of the implementation details and not part of the SystemC standard per se. You are free to use your own implementation of the SystemC standard. If you wish to debate this further, please become a member of Accellera and join the Language Working Group to participate in discussions. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...