projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea8927f
)
shm: explicitly mark shm seg for MAP_NORESERVE to request overcommiting no matter...
author
Lennart Poettering
<lennart@poettering.net>
Tue, 2 Feb 2010 07:51:44 +0000
(08:51 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 2 Feb 2010 08:01:04 +0000
(09:01 +0100)
src/pulsecore/shm.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/shm.c
b/src/pulsecore/shm.c
index
fbf777a
..
29849d5
100644
(file)
--- a/
src/pulsecore/shm.c
+++ b/
src/pulsecore/shm.c
@@
-154,7
+154,11
@@
int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
goto fail;
}
- if ((m->ptr = mmap(NULL, PA_PAGE_ALIGN(m->size), PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t) 0)) == MAP_FAILED) {
+#ifndef MAP_NORESERVE
+#define MAP_NORESERVE 0
+#endif
+
+ if ((m->ptr = mmap(NULL, PA_PAGE_ALIGN(m->size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_NORESERVE, fd, (off_t) 0)) == MAP_FAILED) {
pa_log("mmap() failed: %s", pa_cstrerror(errno));
goto fail;
}