Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
8dcf947d
Commit
8dcf947d
authored
Oct 10, 2008
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmap: Only use MAP_NOCACHE on platforms that support it.
That would be Darwin and some BSDs apparently
parent
cbc1122a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
modules/access/mmap.c
modules/access/mmap.c
+6
-1
No files found.
modules/access/mmap.c
View file @
8dcf947d
...
@@ -136,7 +136,12 @@ static int Open (vlc_object_t *p_this)
...
@@ -136,7 +136,12 @@ static int Open (vlc_object_t *p_this)
/* Autodetect mmap() support */
/* Autodetect mmap() support */
if
(
st
.
st_size
>
0
)
if
(
st
.
st_size
>
0
)
{
{
void
*
addr
=
mmap
(
NULL
,
1
,
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
|
MAP_NOCACHE
,
fd
,
0
);
int
flags
=
MAP_PRIVATE
;
#if defined(MAP_NOCACHE)
flags
|=
MAP_NOCACHE
;
#endif
void
*
addr
=
mmap
(
NULL
,
1
,
PROT_READ
|
PROT_WRITE
,
flags
,
fd
,
0
);
if
(
addr
!=
MAP_FAILED
)
if
(
addr
!=
MAP_FAILED
)
munmap
(
addr
,
1
);
munmap
(
addr
,
1
);
else
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment