mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
Compare commits
2 commits
b232ee1518
...
752c3e742c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
752c3e742c | ||
|
|
6b010e1f42 |
1 changed files with 2 additions and 7 deletions
|
|
@ -62,16 +62,15 @@
|
|||
|
||||
/* 1 GiB at max */
|
||||
#define MAX_SHM_SIZE (PA_ALIGN(1024*1024*1024))
|
||||
#define SHM_ID_LEN 10
|
||||
|
||||
#ifdef __linux__
|
||||
/* On Linux we know that the shared memory blocks are files in
|
||||
* /dev/shm. We can use that information to list all blocks and
|
||||
* cleanup unused ones */
|
||||
#define SHM_PATH "/dev/shm/"
|
||||
#define SHM_ID_LEN 10
|
||||
#elif defined(__sun)
|
||||
#define SHM_PATH "/tmp"
|
||||
#define SHM_ID_LEN 15
|
||||
#define SHM_PATH "/tmp/.LIBRT/SHM"
|
||||
#else
|
||||
#undef SHM_PATH
|
||||
#undef SHM_ID_LEN
|
||||
|
|
@ -450,11 +449,7 @@ int pa_shm_cleanup(void) {
|
|||
char fn[128];
|
||||
struct shm_marker *m;
|
||||
|
||||
#if defined(__sun)
|
||||
if (strncmp(de->d_name, ".SHMDpulse-shm-", SHM_ID_LEN))
|
||||
#else
|
||||
if (strncmp(de->d_name, "pulse-shm-", SHM_ID_LEN))
|
||||
#endif
|
||||
continue;
|
||||
|
||||
if (pa_atou(de->d_name + SHM_ID_LEN, &id) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue