top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How function pointers are shared across different processes?

+2 votes
573 views
How function pointers are shared across different processes?
posted Sep 29, 2013 by Ganesh Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+3 votes

Two processes can not share function pointers.
Both process has a different virtual address space. If you send address of a function from process A to process B, in process B address from A does not make any sense. The memory mapping in process A will be different from that in process B. If you want to do so u need to know the memory mapping of process A and according to that you need to deference the memory in process B.

answer Sep 29, 2013 by Satyabrata Mahapatra
what about shared memory
Yes i think through "Shared memory", it can be possible. But what if the object itself contain a pointer as member variable?
My bad, you are right a pointer is a reference (not the actual memory location) so its not possible.
Similar Questions
+3 votes

And it is dependent on what?(OS/RAM?)

+2 votes

How a background process is treated by operating system ?

+2 votes

I have read somewhere workload is nothing but a group of processes running under same compartment. Where compartment is n- Partition / virtual partition.

Is it correct?

+1 vote

while going through various synchronization mechanism like semaphore, mutex. I stopped at Monitor. I want to know how it is differ from semaphore and mutex. when use of monitor is preferable than semaphore and mutex ?

...