Ejemplo n.º 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;
}
Ejemplo n.º 2
0
void *CancelableCancelUpdate::operator new(size_t aSize)
{
	return sCancelPool.Alloc();
}
Ejemplo n.º 3
0
void *Cancelable::operator new(size_t aSize)
{
	return sPool.Alloc();
}
Ejemplo n.º 4
0
void *TetherBurn::operator new(size_t aSize)
{
	return sTetherBurnPool.Alloc();
}
Ejemplo n.º 5
0
void *Explosion::operator new(size_t aSize)
{
	return sPool.Alloc();
}
Ejemplo n.º 6
0
void *Resource::operator new(size_t aSize)
{
	return sPool.Alloc();
}
Ejemplo n.º 7
0
void *CapturableCaptureUpdate::operator new(size_t aSize)
{
	return sCapturePool.Alloc();
}
Ejemplo n.º 8
0
void *PickupGrantUpdate::operator new(size_t aSize)
{
	return sKillPool.Alloc();
}
Ejemplo n.º 9
0
void *Pickup::operator new(size_t aSize)
{
	return sPool.Alloc();
}
Ejemplo n.º 10
0
void *Renderable::operator new(size_t aSize)
{
	return sPool.Alloc();
}