оптимизации pool_free()

This commit is contained in:
Kolan Sh 2011-04-29 22:19:07 +04:00
parent b006aa66a8
commit 3f1e00dd1e
1 changed files with 3 additions and 4 deletions

View File

@ -73,13 +73,12 @@ inline void pool_free(void *p)
return; return;
struct block_s *b1 = (struct block_s *)(p - 2 * sizeof(struct block_s *)), struct block_s *b1 = (struct block_s *)(p - 2 * sizeof(struct block_s *)),
*b0 = b1->prev,
*b2 = b1->next; *b2 = b1->next;
if (b0) if (b1->prev)
b0->next = b2; b1->prev->next = b2;
if (b2) if (b2)
b2->prev = b0; b2->prev = b1->prev;
if (free_pool) { if (free_pool) {
b1->next = free_pool; b1->next = free_pool;