@@ -41,14 +41,14 @@ void scramble(void* ptr, std::size_t size) {
41
41
void * allocate (std::size_t size, bool array, std::align_val_t align) {
42
42
if (memory_tracking && num_allocations == max_allocations) {
43
43
if constexpr (debug_alloc) {
44
- std::printf (" alloc %ld failed\n " , size);
44
+ std::printf (" alloc %zu failed\n " , size);
45
45
}
46
46
throw std::bad_alloc ();
47
47
}
48
48
49
49
if (force_next_allocation_failure) {
50
50
if constexpr (debug_alloc) {
51
- std::printf (" alloc %ld failed\n " , size);
51
+ std::printf (" alloc %zu failed\n " , size);
52
52
}
53
53
force_next_allocation_failure = false ;
54
54
throw std::bad_alloc ();
@@ -69,13 +69,13 @@ void* allocate(std::size_t size, bool array, std::align_val_t align) {
69
69
70
70
if (!p) {
71
71
if constexpr (debug_alloc) {
72
- std::printf (" alloc %ld failed\n " , size);
72
+ std::printf (" alloc %zu failed\n " , size);
73
73
}
74
74
throw std::bad_alloc ();
75
75
}
76
76
77
77
if constexpr (debug_alloc) {
78
- std::printf (" alloc %ld -> %p\n " , size, p);
78
+ std::printf (" alloc %zu -> %p\n " , size, p);
79
79
}
80
80
81
81
if constexpr (scramble_alloc) {
0 commit comments