cbpporter Messages: 1428 Registered: September 2007
Ultimate Contributor
mdelfede wrote on Tue, 24 January 2012 11:00
cbpporter wrote on Mon, 23 January 2012 21:22
....
And I am using some DLLs. Should I use the USE_MALLOC flag?
That's almost for sure the problem.
I'm using OCE library which does custom allocation and has *many* allocation bugs that clashes completely with Upp custom allocators.
If your DLL allocates something and you deallocate it in Upp, or the way around, you'll have problems for sure.
You'll have problems anyways if your DLL uses custom allocation different from malloc()/free()... the right approach would be to *not* manage the same memory on both sides, which is quite difficult sometimes.
Max
Thanks! In my case parts of the memory are shared with the GPU also. I'll try the flag.
The code is already very CPU capped so I guess it wouldn't hurt if I implement a memory chunk pooler since I am loosing the U++ allocator. Most of the times I have to allocate hundreds of KiB every 50 miliseconds and this probably is not the fastest operation.