code: public static MediaDriver.Context getMediaDriverContext(int length) {
          //length of array * sizeof(float)
          int ipcLength = length * 16;
          //padding for NDArrayMessage
          ipcLength += 64;
          //must be a power of 2
          ipcLength *= 2;
          //ipc length must be positive power of 2
          while (!BitUtil.isPowerOfTwo(ipcLength))
              ipcLength += 2;
          // System.setProperty("aeron.term.buffer.size",String.valueOf(ipcLength));
          final MediaDriver.Context ctx =
                          new MediaDriver.Context().threadingMode(ThreadingMode.SHARED).dirsDeleteOnStart(true)
                                          /*  .ipcTermBufferLength(ipcLength)
                                            .publicationTermBufferLength(ipcLength)
                                            .maxTermBufferLength(ipcLength)*/
                                          .conductorIdleStrategy(new BusySpinIdleStrategy())
                                          .receiverIdleStrategy(new BusySpinIdleStrategy())
                                          .senderIdleStrategy(new BusySpinIdleStrategy());
          return ctx;
      }
docs: Get a media driver context
  for sending ndarrays
  based on a given length
  where length is the length (number of elements)
  in the ndarrays hat are being sent
  @param length the length to based the ipc length
  @return the media driver context based on the given length