Commit bdab5d5f authored by Max Kellermann's avatar Max Kellermann

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.
parent 15a4246e
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment