Menu

#4 palloc incorrectly allocates memory from pool children

Crashes_(SEGV)
open
Nick
Misc (3)
3
2014-09-23
2003-01-11
Nick
No

pool.c is written incorrectly, when a pool is full, the
pool should
allocate another block, and not use memory from pool
children.

The pool structure should look like

struct block {
void *mem, *base;
size_t size;
struct block *next_block;
};

struct pool {
unsigned int magic;
struct block *block;

struct pool *children;

struct pool \*parent;
struct pool \*next\_sibling;

.... etc ....
};

Discussion


Log in to post a comment.

MongoDB Logo MongoDB