摘要:        
内存池实现有许多种,各有不同的优缺点。这里不是主要说内存池,只是觉得这个内存池中的指针用得很飘逸!template class T,int AllocSize = 50class MemPool{public:	static void* operator new(size_t allocLength)	{		if(!mStartPotinter)		{			MyAlloc();		}		//将当前指向空闲内存起始地址作为反回地址		unsigned char* p = mStartPotinter;		//取出空闲区域前4字节的值,赋值给空闲地址		//因为前四字节中存放了下一个BLOCK    阅读全文
posted @ 2010-05-03 15:06
麒麟子MrKylin
阅读(350)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号