Info

This question is closed. Reopen it to edit or answer.

Passing pointers between Matlab labs

1 view (last 30 days)
Tyler
Tyler on 26 Sep 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
I am attempting to get around the current limitation from labSends and labReceives being blocking when the data is over a certain size. To do this, I've written two mex functions:
1. Write data out to a memory location (from call to mxCalloc), calls mexMakeMemoryPersistent on this, and return the memory address.
2. Read data out of a specified memory location.
I have verified that this works in sequential code, however when I attempt to use it between labs (using a labSend and labReceive), the lab that is attempting to read the data ends up reading garbage and crashes the script. Is this because each lab only has access to its own memory space, and any attempts to read/write outside of it causes memory faults or violations?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!