Decision time again, as per usual . . .
There are two possibilities that have been previously discussed for the SHM-
based communication system. One is to use a slightly "gappy" system, and to do
all reads and writes from/to the actual SHM itself; the other is to prepare
the packet data beforehand, and then copy the entire packet over to the SHM.
The first approach wastes a small amount of memory in the SHM (reducing the
buffer size by a small amount) but greatly saves on CPU time. The second is
far easier to implement and saves a small amount of memory, but takes far more
CPU time.
The question is, which one?