Re: shared memory
| From: | venkata ramana | Date: | Wed, 19 May 2004 13:47:49 +0000 |
| Subject: | Re: shared memory | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186532@lists.php.net to get a copy of this message | ||
Thanks for your reply, but I afraid you did not get my point. I am
talking about shared memory that is used for Interprocess
communication. We can access the shared memory created by one C
program in other C program and same is the case with php. I am trying
to communicate with a C program from php using shared memory, but I
did not get it working till now.
To be more specific, I want to know
1. Are calls to function ftok() return the same key in both php and C
2. Is the function shmop_open() return the same shared memory as
shmget() system call, when we pass the same key to both the functions.
Thanks in advance
ramana.
On Wed, 19 May 2004 15:00:02 +0300, Burhan Khalid <phplist@meidomus.com> wrote:
>
>
> venkata ramana wrote:
> > Is the shared memory created with php comaptible with that created
> > with a C program? I mean to ask, can we access the data written into
> > shared memory by a C program from a php program?
>
> I would hope not, as this would cause major security problems and system
> instability.
>
> I *believe* once memory has been allocated to a program, it is for its
> exclusive use unless released. Two programs cannot share the same stack
> space.
>
> You would also be compromising the data that's in the shared space.
>
> Burhan
>