Hmm...
Someone corrects me if I am wrong here.
.so could be static shared lib, the linker does the address patching, in
this
case no mem sharing takes place.
Or, .so is dynamic shared lib, the *loader* does the address patching, you
can expect mem sharing in this case.
Check the compiling flags to figure out if the lib is staticly or dynamicly
shared.
>Well, I viewed the memory usage using "cat /proc/meminfo" and found that
the
>"MemFree" was decreasing by an equal amount with each successive instance
of
>the process.
>Isn't MemFree the amount of free memory available?
>Thanks
>Raj
>> You might be looking at the virtual memory, the real physical content
>could
>> be
>> mapped to different processes. So it might be appear to you that way.
>> >My executable links to a shared object (.so). When I run multiple copies
>of
>> >the executable, the memory footprint of each instance reflects that an
>> >instance of the shared object is getting loaded in to memory for each
>> >executable instance.
>> >Is this normal? I was expecting shared objects to behave like DLLs -
code
>> >segment if not replicated in RAM across multiple instances of the
calling
>> >executable.
>> >Any suggestions?
>> >Thanks much
>> >Raj