Not sure if its sufficiently tested for other peoples' usage, but deleting /src/cpp/cuda.hpp: line 1624
seemed to solve my problems. Logic here being that the memory will be freed inside the process that allocated the memory when the object from which the handle was grabbed gets deleted. -Alex On Mon, May 11, 2015 at 12:57 PM, Andreas Kloeckner <[email protected] > wrote: > Alex Park <[email protected]> writes: > > Thank you for the response. > > > > As a followup question, I was looking at the underlying code for > > ipc_mem_handle, and it seems like when a handle is deleted, it tries to > do > > a mem_free on the underlying device pointer. > > > > So could there not be a situation as follows: > > > > 1. Process A allocates gpuarray G and passes IPC handle H to Process B > > 2. Process B unpacks H, does something with it, then lets it go out of > > scope, so H is closed and the underlying gpu mem is freed > > 3. Process A then tries to do something on G but then finds that its > > memory has already been freed > > Hum, sounds like that needs to be fixed. I'd be happy to take a pull > request. > > Andreas > -- *Alex Park, PhD * *Engineer* *Making machines smarter.* *Nervana Systems* | nervanasys.com | (617) 283-6951 6440 Lusk Blvd. #D211, San Diego, CA 92121 2483 Old Middlefield Way #203, Mountain View, CA 94043
_______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
