[pulseaudio-commits] r1380 - /trunk/src/pulsecore/memblock.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Thu Sep 7 13:17:26 PDT 2006
Author: lennart
Date: Thu Sep 7 22:17:25 2006
New Revision: 1380
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1380&root=pulseaudio&view=rev
Log:
don't maintain a list of allocated mempool slots, we don't use it anyway
Modified:
trunk/src/pulsecore/memblock.c
Modified: trunk/src/pulsecore/memblock.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/memblock.c?rev=1380&root=pulseaudio&r1=1379&r2=1380&view=diff
==============================================================================
--- trunk/src/pulsecore/memblock.c (original)
+++ trunk/src/pulsecore/memblock.c Thu Sep 7 22:17:25 2006
@@ -101,7 +101,6 @@
/* A list of free slots that may be reused */
PA_LLIST_HEAD(struct mempool_slot, free_slots);
- PA_LLIST_HEAD(struct mempool_slot, used_slots);
pa_mempool_stat stat;
};
@@ -195,7 +194,6 @@
return NULL;
}
- PA_LLIST_PREPEND(struct mempool_slot, p->used_slots, slot);
return slot;
}
@@ -354,7 +352,6 @@
slot = mempool_slot_by_ptr(b->pool, b->data);
assert(slot);
- PA_LLIST_REMOVE(struct mempool_slot, b->pool->used_slots, slot);
PA_LLIST_PREPEND(struct mempool_slot, b->pool->free_slots, slot);
if (b->type == PA_MEMBLOCK_POOL_EXTERNAL)
@@ -471,7 +468,6 @@
PA_LLIST_HEAD_INIT(pa_memimport, p->imports);
PA_LLIST_HEAD_INIT(pa_memexport, p->exports);
PA_LLIST_HEAD_INIT(struct mempool_slot, p->free_slots);
- PA_LLIST_HEAD_INIT(struct mempool_slot, p->used_slots);
memset(&p->stat, 0, sizeof(p->stat));
@@ -505,9 +501,8 @@
assert(p);
- for (slot = p->free_slots; slot; slot = slot->next) {
+ for (slot = p->free_slots; slot; slot = slot->next)
pa_shm_punch(&p->memory, (uint8_t*) slot + sizeof(struct mempool_slot) - (uint8_t*) p->memory.ptr, p->block_size - sizeof(struct mempool_slot));
- }
}
int pa_mempool_get_shm_id(pa_mempool *p, uint32_t *id) {
More information about the pulseaudio-commits
mailing list