mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
Fix detection of page size for non-POSIX systems.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1312 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
7bc71103fb
commit
d964459a64
2 changed files with 9 additions and 2 deletions
|
|
@ -443,8 +443,14 @@ pa_mempool* pa_mempool_new(int shared) {
|
|||
|
||||
p = pa_xnew(pa_mempool, 1);
|
||||
|
||||
#ifdef HAVE_SYSCONF
|
||||
ps = (size_t) sysconf(_SC_PAGESIZE);
|
||||
|
||||
#elif defined(PAGE_SIZE)
|
||||
ps = (size_t) PAGE_SIZE;
|
||||
#else
|
||||
ps = 4096; /* Let's hope it's like x86. */
|
||||
#endif
|
||||
|
||||
p->block_size = (PA_MEMPOOL_SLOT_SIZE/ps)*ps;
|
||||
|
||||
if (p->block_size < ps)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue