You didn't mention a platform/OS - but this is not easy to do under NT. You would need to write a custom (C) extension to get true file mapping capabilities.
However... most folks share stuff between apps by using files. You can even use flock() to coordinate who has access when (and simulate semaphores or other intertask communication). Files will still be pretty quick as long as the reads and writes aren't too lengthy.
Dave
===========================================
http://badblue.com
Small footprint P2P web server for Windows,
File-sharing, PHP, wireless apps & more