Example #1
0
int main()
{
	MemoryPool *m = new MemoryPool(4);
	int *h;
	int *p=(int*)m->Alloc();
	*p = 1;
	h = p;
	for (int i = 2; i < 256; i++)
	{
		p = (int*)m->Alloc();
		*p = i;
	}
	for (; h != p; h++)
		cout << *h << " " << endl;
	delete m;
}
Example #2
0
void *CancelableCancelUpdate::operator new(size_t aSize)
{
	return sCancelPool.Alloc();
}
Example #3
0
void *Cancelable::operator new(size_t aSize)
{
	return sPool.Alloc();
}
Example #4
0
void *TetherBurn::operator new(size_t aSize)
{
	return sTetherBurnPool.Alloc();
}
Example #5
0
void *Explosion::operator new(size_t aSize)
{
	return sPool.Alloc();
}
Example #6
0
void *Resource::operator new(size_t aSize)
{
	return sPool.Alloc();
}
Example #7
0
void *CapturableCaptureUpdate::operator new(size_t aSize)
{
	return sCapturePool.Alloc();
}
Example #8
0
void *PickupGrantUpdate::operator new(size_t aSize)
{
	return sKillPool.Alloc();
}
Example #9
0
void *Pickup::operator new(size_t aSize)
{
	return sPool.Alloc();
}
Example #10
0
void *Renderable::operator new(size_t aSize)
{
	return sPool.Alloc();
}