summaryrefslogtreecommitdiffstats
path: root/tests/ChunkData/Copies.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ChunkData/Copies.cpp')
-rw-r--r--tests/ChunkData/Copies.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/ChunkData/Copies.cpp b/tests/ChunkData/Copies.cpp
index b10ddb759..502a969e8 100644
--- a/tests/ChunkData/Copies.cpp
+++ b/tests/ChunkData/Copies.cpp
@@ -6,8 +6,16 @@
int main(int argc, char** argv)
{
+ class cStarvationCallbacks
+ : public cAllocationPool<cChunkData::sChunkSection,1600>::cStarvationCallbacks
{
- cChunkData buffer;
+ virtual void OnStartingUsingBuffer() {}
+ virtual void OnStopUsingBuffer() {}
+ virtual void OnBufferEmpty() {}
+ };
+ cAllocationPool<cChunkData::sChunkSection,1600> Pool(std::auto_ptr<cAllocationPool<cChunkData::sChunkSection,1600>::cStarvationCallbacks>(new cStarvationCallbacks()));
+ {
+ cChunkData buffer(Pool);
buffer.SetBlock(3, 1, 4, 0xDE);
buffer.SetMeta(3, 1, 4, 0xA);
@@ -37,7 +45,7 @@ int main(int argc, char** argv)
}
{
- cChunkData buffer;
+ cChunkData buffer(Pool);
NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256 / 2];
for (int i = 0; i < 16 * 16 * 256 / 2; i += 4)
@@ -61,7 +69,7 @@ int main(int argc, char** argv)
}
{
- cChunkData buffer;
+ cChunkData buffer(Pool);
NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256 / 2];
for (int i = 0; i < 16 * 16 * 256 / 2; i += 4)
@@ -85,7 +93,7 @@ int main(int argc, char** argv)
}
{
- cChunkData buffer;
+ cChunkData buffer(Pool);
NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256 / 2];
for (int i = 0; i < 16 * 16 * 256 / 2; i += 4)
@@ -109,7 +117,7 @@ int main(int argc, char** argv)
}
{
- cChunkData buffer;
+ cChunkData buffer(Pool);
BLOCKTYPE SrcBlockBuffer[16 * 16 * 256];
memset(SrcBlockBuffer, 0x00, 16 * 16 * 256);