AnsweredAssumed Answered

Does clSVMAlloc allocate physically contiguous memory?

Question asked by yhwan on Nov 30, 2015
Latest reply on Dec 3, 2015 by yhwan

Hi, I'm a PhD student working on building a software router with APU.


In order to take advantage of APU's memory sharing between CPU and GPU to process packets in parallel, I also need to enable zero-copy between my app and NIC. In order to do that, I have to somehow allocate memory in a physically contiguous order (e.g., clSVMAlloc(2MB) -> allocate physically contiguous memory of 2MB). I was trying to see how clSVMAlloc allocates memory but it seems that's closed source. I'm curious how clSVMAlloc actually allocates memory into physical memory space. Is it allocated contiguously? or is it allocated like normal malloc would do (map virtual address to multiple physical addresses)? If it's not contiguous, is there a way to make it contiguous? Any comment or advice will be a great help!


Thank you,