User: Password:
|
|
Subscribe / Log in / New account

ashmem

ashmem

Posted Dec 21, 2011 4:41 UTC (Wed) by cmccabe (guest, #60281)
In reply to: ashmem by Cyberax
Parent article: Bringing Android closer to the mainline

> Tmpfs also needs to enforce this option for ALL files and
> provide per-app quotas so that one app won't be able to eat all the space.

Android creates a new user for each application, and runs the application as that user. So traditional per-user disk quotas should be usable, at least in theory.

> Besides, tmpfs footprint should be taken into account during
> OOM killer run.

With cgroups and the userspace OOM killer framework, you can implement whatever policy you like.


(Log in to post comments)

ashmem

Posted Dec 22, 2011 13:02 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

Different users must be able to share the shared memory segment, so simple mapping doesn't work. Passing file descriptors using sockets might work, but it's ugly.

ashmem

Posted Dec 22, 2011 18:35 UTC (Thu) by cmccabe (guest, #60281) [Link]

I think we're going to have to agree to disagree. I think passing file descriptors via sockets is elegant.

ashmem

Posted May 24, 2012 8:20 UTC (Thu) by niemshchanchani (guest, #84564) [Link]

i'm trying to share memory between android and chrooted ubuntu, I know I can mount bind /dev/ashmem to the ubuntu side , and i have tried out sockets between android and ubuntu and it works . Now the question is how do i pass the fd from android to ubuntu side?

will simply passing the the fd and then mmaping work? ( i think not, but haven't tried it )

or will i need to extend something in ashmem driver ( user / kernel side) to do that? If someone has already done / knows something abt this can you give me a starting point?


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds