android - sharing a buffer between a Java service and a native app with minimal access overhead -
i trying set shared memory region between android java service , native process. native process has no java component, purely c++, , invoked shell directly command line.
i believe can use ashmem , binder accomplish this. first call ashmem_create_region, call mmap on result, pass resulting fd other process using binder. other process mmap on fd , thereby gains access shared region.
i understand works between 2 java apps , works between java app or service , native mode process.
i wondering how java service can access data efficiently. want use mechanism copy buffer of floats, 300mb in size, native app java service. java service needs access data without overheads such occurs jni. best strategy allocating shared region native program can fast copy of floats buffer , java service can access values minimal overhead?
thanks
have on example. creates shared memory between java , native applications. https://github.com/vecio/androidipc
Comments
Post a Comment