mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
core: Replace PA_PAGE_SIZE with pa_page_size()
PA_PAGE_SIZE using sysconf() may return a negative number CID 1137925, CID 1137926, CID 1138485 instead of calling sysconf() directly, add function pa_page_size() which uses the guestimate 4096 in case sysconf(_SC_PAGE_SIZE) fails using PA_ONCE to only evaluate sysconf() once
This commit is contained in:
parent
c99efbffd6
commit
45d9030638
10 changed files with 55 additions and 38 deletions
|
|
@ -918,7 +918,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
pa_log_debug("Found %u CPUs.", pa_ncpus());
|
||||
|
||||
pa_log_info("Page size is %lu bytes", (unsigned long) PA_PAGE_SIZE);
|
||||
pa_log_info("Page size is %zu bytes", pa_page_size());
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
pa_log_debug("Compiled with Valgrind support: yes");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue