Displaying 2 results from an estimated 2 matches for "pool_append".
2004 Feb 06
4
memory reduction
...flags;
+
+ return pool;
+}
+
+void
+pool_destroy(alloc_pool_t p)
+{
+ struct alloc_pool *pool = (struct alloc_pool *) p;
+ struct pool_extent *cur, *next;
+
+ if (!pool)
+ return;
+
+ if(pool->live)
+ {
+ cur = pool->live;
+ free(cur->start);
+ if (!(pool->flags & (POOL_INTERN | POOL_APPEND)))
+ free(cur);
+ }
+ cur = pool->free;
+ while(cur)
+ {
+ next = cur->next;
+ free(cur->start);
+ if (!(pool->flags & (POOL_INTERN | POOL_APPEND)))
+ free(cur);
+ cur = next;
+ }
+ free(pool);
+}
+
+void *pool_alloc(alloc_pool_t p, size_t len, char *bomb)
+{
+ struct alloc_...
2007 Aug 20
2
DO NOT REPLY [Bug 4904] New: POOL_INTERN ignored in pool_create()
...-qa@samba.org
While investigating a crash in pool_free_old(), I noticed another little buglet
in pool_create() -- the POOL_INTERN flag is checked against pool->flags (which
is newly allocated and zeroed out) instead of the flags argument.
As a result, pool->size won't get adjusted, and POOL_APPEND doesn't get added
into the flags, so extent structures get allocated separately. Since
POOL_INTERN is never checked for anywhere else, it ends up having no effect.
Switching the check from pool->flags to flags doesn't seem to have blown
anything up for me so far. :) One-line patch to be...