goldsborough / ipc-bench

:racehorse: Benchmarks for Inter-Process-Communication Techniques
MIT License
687 stars 108 forks source link

Different shared memory key generation mechanism #8

Closed goldsborough closed 8 years ago

goldsborough commented 8 years ago

Since we communicate the ID and not the key, we can just generate one randomly. Or, rather, to avoid collisions from the randomness, use an incrementing id. But certain ones could still be taken. Maybe just loop and generate new keys until shmget doesn't fail