摘要:
内存池的实现:1:内存池的初始化:对每个子池进行初始化流程,将子池的入口放入内存池中,初始化block状态。void initPools(){ initPool(POOL1,(void*)pool1,POOL1_BLOCK_NUM,POOL1_BLOCK_SIZE); initPool(POOL2,(void*)pool2,POOL2_BLOCK_NUM,POOL2_BLOCK_SIZE); initPool(POOL3,(void*)pool3,POOL3_BLOCK_NUM,POOL1_BLOCK_SIZE); return;}void initPool(unsig... 阅读全文