have you tried eAccelerator ? save opcode cache on disk instead of shared memory. but the disk storage at /dev/shm, so actually still in memory. it looks eAccelerator can't set 0 shared memory size, 1M is minimal per my past experience.
APC / Xcacche / Zend OPcache all have their own SHM logic, while it may be very fast when no issue, it may cause problems you described. I'm curios too why don't use disk storage in /dev/shm. so they can release the SHM logic part, just rely on OS's file system. the SHM logic part, should be very similar with the memory management part in OS, it can be very complex, an application can't handle them well like OS for various cases.