MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / BasicTestTLSF

Function BasicTestTLSF

src/Tests.cpp:8175–8205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8173}
8174
8175static void BasicTestTLSF()
8176{
8177 wprintf(L"Basic test TLSF\n");
8178
8179 VmaVirtualBlock block;
8180
8181 VmaVirtualBlockCreateInfo blockInfo = {};
8182 blockInfo.flags = 0;
8183 blockInfo.size = 50331648;
8184 vmaCreateVirtualBlock(&blockInfo, &block);
8185
8186 VmaVirtualAllocationCreateInfo info = {};
8187 info.alignment = 2;
8188
8189 VmaVirtualAllocation allocation[3] = {};
8190
8191 info.size = 576;
8192 vmaVirtualAllocate(block, &info, allocation + 0, nullptr);
8193
8194 info.size = 648;
8195 vmaVirtualAllocate(block, &info, allocation + 1, nullptr);
8196
8197 vmaVirtualFree(block, allocation[0]);
8198
8199 info.size = 720;
8200 vmaVirtualAllocate(block, &info, allocation + 2, nullptr);
8201
8202 vmaVirtualFree(block, allocation[1]);
8203 vmaVirtualFree(block, allocation[2]);
8204 vmaDestroyVirtualBlock(block);
8205}
8206
8207static void BasicTestAllocatePages()
8208{

Callers 1

TestFunction · 0.85

Calls 4

vmaCreateVirtualBlockFunction · 0.85
vmaVirtualAllocateFunction · 0.85
vmaVirtualFreeFunction · 0.85
vmaDestroyVirtualBlockFunction · 0.85

Tested by

no test coverage detected