- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I know that dynamic arrays being used by the Intel MKL functions needed to be allocated and deleted by the mkl_malloc and mkl_free. I was wondering if there was an mkl_realloc function provided in case you wanted to attempt and change the amount of memory allocated for a specific address stored inside a pointer.
Thanks.
I know that dynamic arrays being used by the Intel MKL functions needed to be allocated and deleted by the mkl_malloc and mkl_free. I was wondering if there was an mkl_realloc function provided in case you wanted to attempt and change the amount of memory allocated for a specific address stored inside a pointer.
Thanks.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
MKL only has the malloc functions, and no remalloc functions. mkl_malloc is calling the system malloc function, and it may allocate a little larger memory size, and make sure it can return the aligned the memory address. If you need to have a aligned remalloc function, I think may do something like that with system remalloc system call.
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So basically, I would have to write my own remalloc function to replace the standard one. If I wanted to do this, do I only need to make sure that remalloc is assigning chunks in multiples of the byte alignment (for example 16 bytes alignment)?
Thanks,
Blake
Thanks,
Blake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Blake,
I just have quick search, in windows, the system runtime library provide the API: _aligned_realloc:
http://msdn.microsoft.com/en-us/library/y69db7sx(v=VS.71).aspx
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Chao Y (Intel)
I just have quick search, in windows, the system runtime library provide the API: _aligned_realloc:
http://msdn.microsoft.com/en-us/library/y69db7sx(v=VS.71).aspx
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