- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I don't know much about the difference among memory allocation with ipp function, standard function or with c++ "new". Maybe a primitive question:
I use IPP function (ippsMalloc_8u in this case) to allocate memories for a signal signal structure. On other places of the programm the standard C malloc is used again and STL objects like stack, queue are also used. I must say quite chaotic![Smiley with tongue out [:-P]](/ISN/Community/en-US/emoticons/emotion-4.gif)
Then the error will occur after the programm runs for a while and allocation and free memory with the hybrid methods are executed for many times. The programm will stop at the line of allocating memory with ippsMalloc_8u or sometimes at "new". It seems rather random as to where and when it happens. I am sure that I free properly all the memories I allocated.
So I doubt it's maybe not allowed to mix memory allocation modes massively. Is there any such cautions as to Ipp allocation?
The version I used is Ipp4.0. Does anyone has a similar question and can help out?
Thanks
I don't know much about the difference among memory allocation with ipp function, standard function or with c++ "new". Maybe a primitive question:
I use IPP function (ippsMalloc_8u in this case) to allocate memories for a signal signal structure. On other places of the programm the standard C malloc is used again and STL objects like stack, queue are also used. I must say quite chaotic
![Smiley with tongue out [:-P]](/ISN/Community/en-US/emoticons/emotion-4.gif)
Then the error will occur after the programm runs for a while and allocation and free memory with the hybrid methods are executed for many times. The programm will stop at the line of allocating memory with ippsMalloc_8u or sometimes at "new". It seems rather random as to where and when it happens. I am sure that I free properly all the memories I allocated.
So I doubt it's maybe not allowed to mix memory allocation modes massively. Is there any such cautions as to Ipp allocation?
The version I used is Ipp4.0. Does anyone has a similar question and can help out?
Thanks
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
the rule is simple:
always use appropriate pair of funtion for allocating/delete memeory blocks. If some block was allocated with ippMalloc - you need to use ippFree to delete block, if block was allocated with CRT malloc/new call you need to use CRT free/delete functions. Never mix allocation/deleting API and you will have no problem (if you have no dynamic memory overruns in code).
BTW, why did not you upgrade to IPP 5.1 (or IPP 5.2 beta, which is the latest availbale version)?
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Vladimir,
thank you very much for your quick reply. It's all I want to know that there's no special rule for IPP allocation.
We bought IPP 4.0 two years ago. Since then we've been satisfied with our version as to the part we needed. Anyway I'll take a look at the IPP 5.2.
Regards,
Binjian
thank you very much for your quick reply. It's all I want to know that there's no special rule for IPP allocation.
We bought IPP 4.0 two years ago. Since then we've been satisfied with our version as to the part we needed. Anyway I'll take a look at the IPP 5.2.
Regards,
Binjian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great, you are welcome :)

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