efficient way to verify one memory block is only readable?