Commit graph

18 commits

Author SHA1 Message Date
David Henningsson
24034ed715 flist: Increase default list size to 256
Nowadays, we are using more hashmaps and other things, than we did
before. Therefore, I often get the "flist is full (don't worry)"
message. This change should avoid that message. I was unable to find
any significance in increase of memory footprint from this change.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-09-23 13:12:54 +03:00
Tanu Kaskinen
25c73a00c4 flist: Make name non-const to avoid casting with pa_xfree(). 2012-03-07 09:39:18 +02:00
David Henningsson
641103314a flist: Avoid the ABA problem
Our flist implementation suffers from the ABA problem
(see http://en.wikipedia.org/wiki/ABA_problem), causing PulseAudio
to crash very rarely, usually inside memblock operations.
By turning stored pointers into stored table indices, we have some
extra bits that we can use to store tag bits, which is a known
workaround for the ABA problem.

Buglink: https://bugs.launchpad.net/bugs/924416
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-03-07 09:34:56 +02:00
Maarten Bosmans
9133c6c935 Make gcc --std=c99 happy
We're now more or less C99 compliant
2011-09-03 12:17:28 +02:00
Maarten Bosmans
b430407f47 Plug some memory leaks and an invalid read
Note in protocol-dbus.c specifically, method_signatures needs to be freed
before method_handlers, because otherwise h->method_name is freed while it is
still in use as a key in the method_signatures hashmap.
2011-08-12 20:31:52 +02:00
Maarten Bosmans
dd9265ac78 Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
Lennart Poettering
1250b5d735 ratelimit: fix log levels of log suppression messages
When logging a suppression message do so on the same log level as the
suppressed messages.

Cherry picked by Colin Guthrie from ec5a785712
with a couple of additional changes due to extra limiting in master
that was not present in stable-queue.
2011-01-31 11:36:24 +00:00
Jyri Sarha
34d022c16e core: Change sematics of pa_flist_new_with_name() (v1.1)
Name string is copied and added to flist structure. The original is
responsibility of the caller. The name is only used for debug printing.
2011-01-15 13:22:13 +00:00
Jyri Sarha
427758aa4c core: Add name to flist struct for more informative log messages
PA_STATIC_FLIST_DECLARE macro sets the flist name automatically.
2010-11-28 16:37:56 +00:00
Jyri Sarha
851a188cf6 core: Lower "flist is full" log message level to debug and ratelimit it 2010-11-28 16:27:05 +00:00
Jyri Sarha
914876b40a core: New LIFO style flist implementation v2.2
The old free list implementation used objects in FIFO style. This is
bad because it tries keep all the objects ever used alive and in
memory. This minimizes the changes that an allocated object is already
in cache. When there is shortage of physical memory this may also
increase change that newly allocated object is swapped out. LIFO
(e.g. stack) style free list should help these issues. Like the old
one the new implementation is also lock free. This version (v2.1) of
the patch has a potential weakness fixed. The previous version (2.0)
did segfault when popping from empty flist, this does not.
2010-11-16 21:29:58 +00:00
Lennart Poettering
f5046759cd llvm-clang-analyzer: drop a few unnecessary assignments and other trivial fixes 2009-09-08 23:46:23 +02:00
Lennart Poettering
6dca92be96 rework the flist implementation to halve memory consumption by merging the state field and the pointer in the flist cells 2008-06-27 19:18:19 +02:00
Lennart Poettering
8ae83d618e get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
Lennart Poettering
a67c21f093 merge 'lennart' branch back into trunk.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28 19:13:50 +00:00
Pierre Ossman
06211b7c8f Add copyright notices to all relevant files. (based on svn log)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-02-13 15:35:19 +00:00
Pierre Ossman
521daf6f0a Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
mmmkay?


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 13:43:45 +00:00
Lennart Poettering
ee40a3439f implement a simple lock-free free list
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1382 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-09 21:05:31 +00:00