you can remove shared memory segments by looking at the 7th set of numbers on the od -x output. For example, the 7th set of numbers from above was: 17ca. You will then do an ipcs -a | grep 17ca command to get the list of shared memory segments. This will give you an output like the following:
You will then need to use the ipcrm command to remove the unwanted memory segments. In this example, you would do the following: Note this will need to be done as root