Questions tagged [ashmem]

Ashmem is a linux kernel interface that allows processes which are not related by ancestry to share memory maps by name, which are cleaned up automatically.

Ashmem is a linux kernel interface that allows processes which are not related by ancestry to share memory maps by name, which are cleaned up automatically.

Plain old anonymous mmaps and System V shared memory lack some of these requirements.

23 questions
1
vote
1 answer

Android: Sharing data between native code (C) and application (java)

I have a native app running on Android 5.0, an audio effect actually, that get launched on camcorder recording usecase (for instance). I have an application that needs to retrieve some data from it, 3 integers exaclty, that changes constantly. How…
1
vote
3 answers

Shared memory region in NDK

I want to have a shared memory block (an ashmem region) that's mapped and accessed from native code. I also want this block to be used by several applications. I also want it to work on SDK level 7 (Android 2.1) There are two routes. I can create an…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
0
votes
1 answer

Inode and deleted file entries

This is in reference to the answer here , since I received no response to my question in the comments. What it really means is that a file entry was created in the /dev/ashmem/ directory, then later removed, but that the corresponding i-node…
Zoso
  • 3,273
  • 1
  • 16
  • 27
0
votes
1 answer

How to use MemoryFile to perform IPC in android?

MemoryFile is documented as a wrapper around Android's Ashmem: https://developer.android.com/reference/android/os/MemoryFile.html Ashmem, of course, is used to perform IPC. However in the current api of MemoryFile I don't see anything facilitating…
darklord
  • 5,077
  • 12
  • 40
  • 65
0
votes
1 answer

How to release ashmem

Allocating and using ashmem works well: ashmemFD = open("/dev/ashmem", O_RDWR); int ret = ioctl(ashmemFD, ASHMEM_SET_NAME, "vf"); ioctl(ashmemFD, ASHMEM_SET_SIZE, size); ashmap = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFD,…
user3387542
  • 611
  • 1
  • 8
  • 28
0
votes
0 answers

Why does my apps get more native memory on Vendor/App?

I am seeing different behavior on my memory usage ( dalvik and native also other ) when I install my app in /vendor/app rather than installing with package manager into /data/data. Does android treat these apps differently and pre-allocate more…
user1470618
  • 147
  • 2
  • 11
0
votes
1 answer

Regarding the use of Asynchronous shared memory (ASHMEM) in android apps written in java

How android applications (not native apps) which are actually in dalvik byte code can be benefited from ASHMEM. Are their any API in android framework for application developers? I know this is kind of a generic question but I would not have put it…
P basak
  • 4,874
  • 11
  • 40
  • 63
0
votes
0 answers

using ashmem between native process and java service without high overheads

I am trying to set up a shared memory region between an Android Java service and a native process. The native process has no Java component, is purely C++, and is invoked from the shell directly by a command line. The application needs to send full…
1
2