Hi all,
I had posted one question regarding sharing the data
acorss the processe using /SECTION in .def or link
options.
I have one more query regarding it.
I have a object having a member variable which
increases in size dynamically and i want to share this
object among the processe using /SECTION.
First of all is this correct/safe way.
If yes, who takes care of increasing the shared
section when my object size increases dynamically.
any doc/links will be appreciated.
Rgds,
manish
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Hello,
First of all is this correct/safe way.
I mean No !. For shared memory use the normal WIN32 API and create
this shared memory for the first process. So all instances
can ask for this memory and use the data inside the shared memory.
You need 2 shared memory sections. One contains the length information
for the second dynamically memory. When this dynamically part is
changed you need a notification to all processes. (named semaphore
…).
elli
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>I have a object having a member variable which
increases in size dynamically and i want to share this
object among the processe using /SECTION.
Seems like you must have a POINTER to a variable size member. The memory
this pointer points at will not be shared by multiple processes, unless you
specifically allocate it as shared memory.
First of all is this correct/safe way.
You can have a shared piece of dynamically allocated memory, but can’t
guarantee it will be at the same address in every process. These are
basically memory mapped files, with the backing file being the system
paging file.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Hi,
thanx.
Is it necessary to do unmapviewofFile and closehandle
and restart the procedure right from
createfilemapping.
or only mapviewoffile will do.
Rgds,
Manish
— Mathias Ellinger wrote:
> Hello,
>
> >First of all is this correct/safe way.
>
> I mean No !. For shared memory use the normal WIN32
> API and create
> this shared memory for the first process. So all
> instances
> can ask for this memory and use the data inside the
> shared memory.
>
> You need 2 shared memory sections. One contains the
> length information
> for the second dynamically memory. When this
> dynamically part is
> changed you need a notification to all processes.
> (named semaphore
> …).
>
> elli
>
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com