what is the use of MemoryFile in android

前端 未结 3 1459
有刺的猬
有刺的猬 2020-12-01 16:51

I want to write some bytes to a shared memory. This is done in my application1. From my another application: application2 I want to access that shared memory to read the wri

3条回答
  •  没有蜡笔的小新
    2020-12-01 17:43

    MemoryFile can be used to map to physical memory. The result file descriptor (fd) can be passed to client (memory sharing side). The client can map the same native fd to the same memory region. The memory can then be shared using the native fd, which can be mapped to java layer using InputStream.

    Please refer to this link for more details:
    Sharing memory using ashem.

提交回复
热议问题