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.
This commit is contained in:
parent
15a4246ead
commit
bdab5d5f6e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user