From bdab5d5f6ed5362f96faa3912fe8e6d1ed53505d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 4 Jan 2013 15:34:41 +0100 Subject: 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. --- src/MusicBuffer.cxx | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/MusicBuffer.cxx') diff --git a/src/MusicBuffer.cxx b/src/MusicBuffer.cxx index f1547f1f..59e59a95 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 @@ -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; -- cgit v1.2.3