pub unsafe extern "C" fn vmaCheckCorruption(
    allocator: VmaAllocator,
    memoryTypeBits: u32
) -> Result
Expand description

\brief Checks magic number in margins around all allocations in given memory types (in both default and custom pools) in search for corruptions.

\param allocator \param memoryTypeBits Bit mask, where each bit set means that a memory type with that index should be checked.

Corruption detection is enabled only when VMA_DEBUG_DETECT_CORRUPTION macro is defined to nonzero, VMA_DEBUG_MARGIN is defined to nonzero and only for memory types that are HOST_VISIBLE and HOST_COHERENT. For more information, see [Corruption detection](@ref debugging_memory_usage_corruption_detection).

Possible return values:

  • VK_ERROR_FEATURE_NOT_PRESENT - corruption detection is not enabled for any of specified memory types.
  • VK_SUCCESS - corruption detection has been performed and succeeded.
  • VK_ERROR_UNKNOWN - corruption detection has been performed and found memory corruptions around one of the allocations. VMA_ASSERT is also fired in that case.
  • Other value: Error returned by Vulkan, e.g. memory mapping failure.