dd66bcbf9d6ef0c50a18d9c4b1b39ce7ef7afcc4 |
|
12-Apr-2011 |
Elliott Hughes <enh@google.com> |
More native code cleanup. Don't keep unused global references to classes, don't throw exceptions when an exception is already pending, and fix a (harmless) misunderstanding about how GetStringChars works. Change-Id: Ie445036f057daa8a1c76aceb7bad2a84fb81d820
/frameworks/base/core/jni/android_os_MemoryFile.cpp
|
7bcbd511731e13b9f2778e6aa6c633417d266f5e |
|
23-Jun-2009 |
Marco Nelissen <marcone@google.com> |
Don't round size to page size. Ashmem will do this internally as needed.
/frameworks/base/core/jni/android_os_MemoryFile.cpp
|
ec100900e63a8374ac010e7131d9c7e54c5e6984 |
|
17-Jun-2009 |
Marco Nelissen <marcone@google.com> |
MemoryFile.isMemoryFile was internally determining the length of the ashmem region. This is actually useful information to have, so expose that more directly.
/frameworks/base/core/jni/android_os_MemoryFile.cpp
|
963cd006c45716b034f656bf7e7179e6476f7e4d |
|
29-May-2009 |
Bjorn Bringert <bringert@android.com> |
Allow creating AssetFileDescriptors for MemoryFiles. This allows content providers to use in-memory data to implement ContentProvider.openAssetFile(), instead of just normal files and sockets as before. To test cross-process use of AssetFileDescriptors for MemoryFiles, a test content provider and a client for it are added to AndroidTests. Fixes http://b/issue?id=1871731
/frameworks/base/core/jni/android_os_MemoryFile.cpp
|
ad984f19339008f7eb8687aecc1779be70bc1f65 |
|
01-Jun-2009 |
Bjorn Bringert <bringert@android.com> |
Use JNI region calls in MemoryFile read and write. This will reduce copying or pinning, depending on GC policies, which should improve performance. See dalvik/docs/jni-tips.html#RegionCalls for more information. Fixes http://b/issue?id=1887911
/frameworks/base/core/jni/android_os_MemoryFile.cpp
|
761e0918d30b6a3f292625b44b86dffd1538bc78 |
|
29-May-2009 |
Bjorn Bringert <bringert@android.com> |
Unmap memory in MemoryFile.close(). As reported in http://b/issue?id=1398215 MemoryFile did not munmap(2) the ashmem region after closing it. This causes the process to leak virtual address space. This change fixes the problem by calling munmap(2) in close(). The unmapping is done by a helper method deactivate(). The change also replaces the use of an int for the file descriptor with a FileDescriptor object to make sure that we keep track of when the file descriptor has been closed. I chose to implement it this way because I will need decativate() and a FileDescriptor object in an upcoming change that allows sending MemoryFile file descriptors between processes. The change also adds a number of tests for the behavior of close(). The testCloseRead() and testCloseWrite() fail with the old MemoryFile implementation, and testCloseLeak() causes a segfault. They all pass now.
/frameworks/base/core/jni/android_os_MemoryFile.cpp
|
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android_os_MemoryFile.cpp
|
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android_os_MemoryFile.cpp
|
54b6cfa9a9e5b861a9930af873580d6dc20f773c |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/base/core/jni/android_os_MemoryFile.cpp
|