Shared memory and IPC
Rich Salz
rsalz at zolera.com
Wed Sep 5 18:38:41 GMT 2001
> MEMCTX_SHARED returns an optionally-provided shared allocator
Well at least it's optional. :)
> What if they had prior knowledge of the existence of the shared memory
> region?
Both mmap() and shmat() let you specify a "hint", but things can fail
depending on the initial process size, amount of sbrk() [malloc] use,
etc. It's hard to see how a single pointer can be valid for both of
these, for example:
; size /bin/rc /usr/local/bin/htmldoc
text data bss dec hex filename
61207 8960 12184 82351 141af /bin/rc
133889 11532 6220864 6366285 61244d /usr/local/bin/htmldoc
; file /bin/rc /usr/local/bin/htmldoc
/bin/rc: ELF 32-bit LSB executable, Intel 80386, version
1, dynamically linked (uses shared libs), not stripped
/usr/local/bin/htmldoc: ELF 32-bit LSB executable, Intel 80386, version
1, dynamically linked (uses shared libs), not stripped
(htmldoc does HTML to PDF; rc is my login shell, a clone of the Plan9
shell)
/r$
--
Zolera Systems, Your Key to Online Integrity
Securing Web services: XML, SOAP, Dig-sig, Encryption
http://www.zolera.com
More information about the samba-technical
mailing list