OSDN Git Service

ashmem: Don't install fault handler for private mmaps.
authorArve Hjønnevåg <arve@android.com>
Tue, 28 Apr 2009 01:20:59 +0000 (18:20 -0700)
committerArve Hjønnevåg <arve@android.com>
Tue, 28 Apr 2009 22:25:16 +0000 (15:25 -0700)
commit11fd1772d96736c065f722d6d8a5092f086be3f7
treea60c5eaa14460f14a198a5ca9cce3d4e7eb84d31
parent0bdcd41c3693827df10ec24d04f37db3ec04c571
ashmem: Don't install fault handler for private mmaps.

Ashmem is used to create named private heaps. If this heap is backed
by a tmpfs file it will allocate two pages for every page touched.
In 2.6.27, the extra page would later be freed, but 2.6.29 does not
scan anonymous pages when running without swap so the memory is not
freed while the file is referenced. This change changes the behavior
of private ashmem mmaps to match /dev/zero instead tmpfs.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
mm/ashmem.c