test/util_allocator.h

changeset 571
f83583a0bbac
parent 518
74d0372f5c6f
child 628
1e2be40f0cb5
equal deleted inserted replaced
570:7edce1b5a798 571:f83583a0bbac
62 * Constructs a new testing allocator. 62 * Constructs a new testing allocator.
63 */ 63 */
64 CxTestingAllocator(); 64 CxTestingAllocator();
65 65
66 /** 66 /**
67 * Verifies that this allocator has been used.
68 *
69 * @return true if any allocation was attempted using this allocator
70 */
71 [[nodiscard]] bool used() const;
72
73 /**
67 * Verifies that all allocated memory blocks are freed and no free occurred twice. 74 * Verifies that all allocated memory blocks are freed and no free occurred twice.
68 * 75 *
69 * @return true iff all tracked allocations / deallocations were valid 76 * @return true iff all tracked allocations / deallocations were valid
70 */ 77 */
71 bool verify() const; 78 [[nodiscard]] bool verify() const;
72 }; 79 };
73 80
74 #endif /* UCX_UTIL_ALLOCATOR_H */ 81 #endif /* UCX_UTIL_ALLOCATOR_H */

mercurial