memory allocated with mxMalloc
3 次查看(过去 30 天)
显示 更早的评论
Suppose within an m-file I use a mex file to allocate persistent memory using mxMalloc and mxMakeMemoryPersistent.
When the mex file returns, I then start a batch job and pass the pointer returned by the mex file to the batch job.
Will the batch job be able to access this memory?
More info: A GUI is used to control hardware components which write to the mxMalloc'ed memory block, I would like the batch job to save the data written there in parallel. Don't worry, synchronization will be taken care of.
3 个评论
Peter Li
2011-9-23
Ah sorry, I didn't realize this was specific to interprocess calls. In that case Edric's suggestion sounds like the way to go.
采纳的回答
Edric Ellis
2011-9-20
Do you mean a 'batch job' created using the BATCH function in Parallel Computing Toolbox? If so, then no, the workers executing the batch job will not have access to the memory as they run in a completely separate MATLAB process.
You might wish to check out 'sharedmatrix' from the File Exchange:
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!