aboutsummaryrefslogtreecommitdiffstats
path: root/src/MusicBuffer.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-04 15:34:41 +0100
committerMax Kellermann <max@duempel.org>2013-01-04 15:42:15 +0100
commitbdab5d5f6ed5362f96faa3912fe8e6d1ed53505d (patch)
tree522fe8da83fa7bc82d3dea15ac9fc5bd2aa272c4 /src/MusicBuffer.cxx
parent15a4246ead3cceef7db63f12f48792d3fb0aa29b (diff)
downloadmpd-bdab5d5f6ed5362f96faa3912fe8e6d1ed53505d.tar.gz
mpd-bdab5d5f6ed5362f96faa3912fe8e6d1ed53505d.tar.xz
mpd-bdab5d5f6ed5362f96faa3912fe8e6d1ed53505d.zip
MusicBuffer: disable memory poisoning
This is harmful for memory usage, because it forces the kernel to allocate physical memory, even before playback has started. No bug has been found in a few years with this, so it's safe to assume that this code is not necessary.
Diffstat (limited to 'src/MusicBuffer.cxx')
-rw-r--r--src/MusicBuffer.cxx4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/MusicBuffer.cxx b/src/MusicBuffer.cxx
index f1547f1f4..59e59a953 100644
--- a/src/MusicBuffer.cxx
+++ b/src/MusicBuffer.cxx
@@ -20,7 +20,6 @@
#include "config.h"
#include "MusicBuffer.hxx"
#include "MusicChunk.hxx"
-#include "poison.h"
#include <glib.h>
@@ -54,12 +53,10 @@ music_buffer_new(unsigned num_chunks)
buffer->num_chunks = num_chunks;
chunk = buffer->available = buffer->chunks;
- poison_undefined(chunk, sizeof(*chunk));
for (unsigned i = 1; i < num_chunks; ++i) {
chunk->next = &buffer->chunks[i];
chunk = chunk->next;
- poison_undefined(chunk, sizeof(*chunk));
}
chunk->next = NULL;
@@ -124,7 +121,6 @@ music_buffer_return(struct music_buffer *buffer, struct music_chunk *chunk)
g_mutex_lock(buffer->mutex);
music_chunk_free(chunk);
- poison_undefined(chunk, sizeof(*chunk));
chunk->next = buffer->available;
buffer->available = chunk;