BlankMan wrote:
Again, never stopping ZM, I tried to again set the buffers to 60, and zmc started, no shmget error. I even successfully set the buffers to 400 on one camera as a test and it worked.
This leads me to believe that it just may be a memory fragmentation issue.
This is all down to how the OS allocates and manages shared memory.
Once a shared memory segment is allocated its size can not change beyond the original allocation. This means that, for example, you could start ZM with a 60 frame buffer, reduce it to 40 and then increase back to 60 but you could not increase it beyond the initial 60. You would also have problems increasing the size of image as this would also increase the shared memory needed.
The only solution is to de-allocate the memory prior to increasing it. This is what you effectively do when stop and restart ZM.
Changing the code to automatically do this may not work as the memory will not be freed until all processes using it have detached from it and there may be several processes attached.