summaryrefslogtreecommitdiff
path: root/include/osl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-06-02 20:29:40 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-06-03 01:37:33 +0200
commit261a2ad41c7478d0771c74825eca74939f7c55ee (patch)
treea560020f7b6b785c935d78ec2545973fc3552bcb /include/osl
parentf7b5b5448b0d21675569d4f011e518a282ca0612 (diff)
osl: explain why in file.h a memory mapped file is "shared"
The original comment reads: Don't know what the "shared" is supposed to mean there? Also, obviously this API can be used to map *part* of a file into memory, and different parts can be mapped separately even. That's because memory mapped files can be used as a form of IPC that allows multiple processes to share data. Change-Id: I3cb34fcdb0a93233b22ac888712f9c1d650b30ea Reviewed-on: https://gerrit.libreoffice.org/38348 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'include/osl')
-rw-r--r--include/osl/file.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/osl/file.h b/include/osl/file.h
index 73349572063c..01b6288ea0be 100644
--- a/include/osl/file.h
+++ b/include/osl/file.h
@@ -766,9 +766,8 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileSize(
/** Map a shared file into memory.
- Don't know what the "shared" is supposed to mean there? Also,
- obviously this API can be used to map *part* of a file into
- memory, and different parts can be mapped separately even.
+ Files can be mapped into memory to allow multiple processes to use
+ this memory-mapped file to share data.
On Android, if the Handle refers to a file that is actually inside
the app package (.apk zip archive), no new mapping is created,
@@ -790,8 +789,6 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_mapFile (
/** Unmap a shared file from memory.
- Ditto here, why do we need to mention "shared"?
-
This function just won't work on Android in general where for
(uncompressed) files inside the .apk, per SDK conventions in the
/assets folder, osl_mapFile() returns a pointer to the file inside