equal
deleted
inserted
replaced
16 { |
16 { |
17 uint i; |
17 uint i; |
18 |
18 |
19 DEBUG(misc, 4, "[Pool] (%s) cleaning pool..", this->name); |
19 DEBUG(misc, 4, "[Pool] (%s) cleaning pool..", this->name); |
20 |
20 |
|
21 this->cleaning_pool = true; |
21 /* Free all blocks */ |
22 /* Free all blocks */ |
22 for (i = 0; i < this->current_blocks; i++) { |
23 for (i = 0; i < this->current_blocks; i++) { |
23 if (this->clean_block_proc != NULL) { |
24 if (this->clean_block_proc != NULL) { |
24 this->clean_block_proc(i * (1 << this->block_size_bits), (i + 1) * (1 << this->block_size_bits) - 1); |
25 this->clean_block_proc(i * (1 << this->block_size_bits), (i + 1) * (1 << this->block_size_bits) - 1); |
25 } |
26 } |
26 free(this->blocks[i]); |
27 free(this->blocks[i]); |
27 } |
28 } |
|
29 this->cleaning_pool = false; |
28 |
30 |
29 /* Free the block itself */ |
31 /* Free the block itself */ |
30 free(this->blocks); |
32 free(this->blocks); |
31 |
33 |
32 /* Clear up some critical data */ |
34 /* Clear up some critical data */ |