carb::extras::isMemoryOverlap

Defined in carb/extras/StringSafe.h

inline bool carb::extras::isMemoryOverlap(const void *ptr1, size_t size1, const void *ptr2, size_t size2)

Check if two memory regions overlaps.

Parameters
  • ptr1[in] pointer to a first memory region.

  • size1[in] size in bytes of the first memory region.

  • ptr2[in] pointer to a second memory region.

  • size2[in] size in bytes of the second memory region.

Returns

true if memory regions overlaps or false if they are not.