D3D12MemoryAllocator icon indicating copy to clipboard operation
D3D12MemoryAllocator copied to clipboard

BlockMetadata_TLSF::WriteAllocationInfoToJson

Open ttcvetkov opened this issue 1 year ago • 2 comments

https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator/blob/e00c4a7c85cf9c28c6f4a6cc75032736f416410f/src/D3D12MemAlloc.cpp#L5033

Why do you cast uint64 to bool?

ttcvetkov avatar Sep 19 '24 09:09 ttcvetkov

As far as I remember, this is a trick to make the value count as 0 or 1, so that the argument value is increased by one when m_NullBlock->size is not zero.

Do you observe any problem with this expression? Some error or warning in your compiler?

adam-sawicki-a avatar Sep 19 '24 09:09 adam-sawicki-a

No problem, just a compiler warning... Thanks,

ttcvetkov avatar Sep 19 '24 10:09 ttcvetkov

I hopefully fixed this warning.

adam-sawicki-a avatar Nov 06 '24 15:11 adam-sawicki-a