/* BEGIN SHARED DATA */
GlobalMemory *global = NULL;
/* END SHARED DATA */
int StartNode, TspSize, NodesFromEnd;
Both TspSize and global are global variables. And in the main function
the following appears
(...)
global = (GlobalMemory *) Tmk_malloc(sizeof(GlobalMemory);
(...) initialization of TspSize
TMK_DISTRIBUTE(TspSize);
(...) Initialization of global
TMK_DISTRIBUTE(global);
What is the difference in the usages of TMK_DISTRIBUTE ?
When are data merely copied to the same variable in all the processes ?
When are they placed in shared memory, visible and modifiable by all the
processes ?
Thank you for any answers
Francisco Pereira