An shm-based buffer API