summaryrefslogtreecommitdiffstats
path: root/libutils/FileMap.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove useless refCounting from FileMap.Narayan Kamath2015-02-231-7/+1
| | | | | | | | | Nobody ever called acquire() so release() was always equivalent to delete. Just use delete instead so that people can use unique_ptr directly (or shared_ptr if they really want refcounts). Change-Id: I9e3ad5e0f6a4fcc4e02e5a2ff7ef9514fe234415
* Remove reference to NOT_USING_KLIBC and cygwin.Narayan Kamath2015-02-191-14/+1
| | | | | | | | | | | | The reference to NOT_USING_KLIBC appears to be the only one in our codebase. This change also removes some cygwin specific retry logic - all other supported platforms in this section of the code should support mapping at an offset. Note that i've reversed the sense of the check, we always sysconf since that's recommended practice. Change-Id: Ib985fb665193d7a07a282f7092cd77c0bc508a66
* kill HAVE_MADVISEYabin Cui2014-11-191-2/+6
| | | | | | Change to avoid "unused parameter" warning. Bug: 18397020 Change-Id: I4b26de55314c78237daead8e873385b97cafe4d4
* kill HAVE_MADVISEYabin Cui2014-11-181-2/+2
| | | | | Bug: 18397020 Change-Id: Ibc8d886d729c51932a403531888214de4e541452
* kill HAVE_POSIX_FILEMAPYabin Cui2014-11-111-12/+10
| | | | | Bug: 18315579 Change-Id: I0bd5fb946b12cb90e0c9c73a478df41609b8c3e2
* Fix windows specific behavior of FileMapXavier Ducrohet2014-10-161-1/+0
| | | | | | | | | | | | | | | | | | | | | The implementation of the FileMap destructor would close the file, only on Windows, which did not match the behavior on mac/linux. This is because calling munmap does not close the file descriptor. It must be closed separately, before or after munmap. On Windows, the file must also be closed manually, before or after closing the mappingFile. The change basically removes the closing file from the windows-specific part of the destructor, to make behavior more consistent on all platforms where the caller to FileMap is responsible for closing its own file (since FileMap receives an opened file). Change-Id: I5e3cfffbb870d5f3595802ccac57dbc1dbf1ce6e
* libutils: turn on -WerrorMark Salyzyn2014-06-021-2/+8
| | | | | | | | | - Deal with some -Wunused issues - Override PRI macros (windows) - Revert use of PRI macros on off64_t (linux) - Deal with a gnu++11 complaince issue Change-Id: Ie66751293bd84477a5a6dfd8a57e700a16e36964
* libutils: FileMap styling adjustmentsMark Salyzyn2014-04-171-35/+26
| | | | Change-Id: I487ebe67a46a7b8f680e722141dd216bbd396f3e
* libutils: FileMap 64 bit compile issuesMark Salyzyn2014-04-171-9/+10
| | | | Change-Id: Ie7a0aeb2a7e2d2a90aa2b97c657ea7ec566bf793
* move libs/utils to libutilsAlex Ray2013-08-021-0/+225
Change-Id: I6cf4268599460791414882f91eeb88a992fbd29d