- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
How can we allocate the memory used by the parallel_for in advance (during the constructions stage) - we try to avoid dynamic allocation as much as we can.
Thanks
How can we allocate the memory used by the parallel_for in advance (during the constructions stage) - we try to avoid dynamic allocation as much as we can.
Thanks
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't see how you could do that, but have you seen a problem or are you just attempting possibly premature optimisation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Raf Schietekat
I don't see how you could do that, but have you seen a problem or are you just attempting possibly premature optimisation?
we try to avoid dynamic allocation because of the nature of our system. if we run parallel_for during the initialization stage of our software, would it solve the problem? would the allocation of all the needed memory would be performed than?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - eyalk
we try to avoid dynamic allocation because of the nature of our system. if we run parallel_for during the initialization stage of our software, would it solve the problem? would the allocation of all the needed memory would be performed than?
Could you say more specifically what problems you try to solve by avoiding dynamic allocation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Alexey Kukanov (Intel)
it would help for some extent, but complete absence of dynamic memory allocation can not be guaranteed.
Could you say more specifically what problems you try to solve by avoiding dynamic allocation?
Could you say more specifically what problems you try to solve by avoiding dynamic allocation?
One of our coding rules is trying to avoid dynamic allocation as much as we can, because during run time there is a possibility that the heap will not have enough memory to allocate. Our system can not allow this to happen (medical care system). So we try to find a way tobring down the amount of dynamic allocation in our code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - eyalk
One of our coding rules is trying to avoid dynamic allocation as much as we can, because during run time there is a possibility that the heap will not have enough memory to allocate. Our system can not allow this to happen (medical care system). So we try to find a way tobring down the amount of dynamic allocation in our code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - eyalk
How can we allocate the memory used by the parallel_for in advance (during the constructions stage) - we try to avoid dynamic allocation as much as we can.
There is no such feature in TBB.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page