- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day. Just started using Inspector (Update 2 build 550070).
After running Locate Memory Problems I always get false positives for _mm_malloc (memory leak) and _mm_free (missing allocation).
To verify the following code also reports false positives:
unsigned char *hostPtr = (unsigned char*)_mm_malloc((((1280 * 960) * sizeof(unsigned char)) + 63) & (-64), 4096); hostPtr[100] = 0xFF; _mm_free(hostPtr);
I don't want to just suppress the errors since to me it looks like Inspector should handle this correctly. Tested with malloc and free and Inspector works as expected.
How do I resolve this?
- Tags:
- CC++
- Debugging
- Development Tools
- Fortran
- Intel® Inspector
- Optimization
- Parallel Computing
- Vectorization
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anyone looked into this yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello! I have similar problem with VirtualAlloc and VirtualFree.
When I build x86 version of a program, Inspector show me "Memory leak" in line of VirtualAlloc, but in x64 version all Ok.
My code:
#include <iostream> #include <Windows.h> #define VMALLOC(size) VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE) #define VMFREE(p) VirtualFree(p, 0, MEM_RELEASE) int main(int argc, char* argv[]) { SYSTEM_INFO sSysInfo; GetSystemInfo(&sSysInfo); const DWORD dwPageSize = sSysInfo.dwPageSize; void* mem = VMALLOC(dwPageSize); if (!mem) { std::cout << "Failed to allocate memory" << std::endl; return -1; } if (!VMFREE(mem)) { std::cout << "Failed to free memory" << std::endl; return -1; } std::cout << "Done" << std::endl; return 0; }
![](/skins/images/872293744008A34B36F8ABF94A46CC66/responsive_peak/images/icon_anonymous_message.png)
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