Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android version of Dart VM should use ashmem. #4408

Closed
DartBot opened this issue Aug 7, 2012 · 7 comments
Closed

Android version of Dart VM should use ashmem. #4408

DartBot opened this issue Aug 7, 2012 · 7 comments
Labels
area-vm type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Aug 7, 2012

This issue was originally filed by jackpa...@google.com


runtime/vm/virtual_memory_android.cc

VirtualMemory::Reserve

Should use the Android-specific ashmem interface instead of ordinary anonymous memory.

@lexprfuncall
Copy link

Using ashmem is similar to using mmap by itself. The major difference comes from the file descriptor passed to mmap.

#include <cutils/ashmem.h>

...

  const char* name = "a name, appears in /proc/<pid>/maps"
  int fd = ashmem_create_region(name, size);
  void* base = mmap(NULL, size, <prot>, MAP_PRiVATE, fd, 0);
  close(fd);

It is useful to associate a name with each virtual memory allocation. The existing functions do not have a way to name memory, but it is invaluable for postmortem debugging. We should add an argument for this. It can be ignored on most platforms.

@iposva-google
Copy link
Contributor

Added this to the Later milestone.
Added Accepted label.

@iposva-google
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-Unassigned label.

@iposva-google
Copy link
Contributor

Removed the owner.
Added Triaged label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@iposva-google
Copy link
Contributor

Stale.

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants