@@ -37,50 +37,50 @@ void f4(void) unchecked {
37
37
38
38
// Test you can always `free` a `malloc`d ptr
39
39
void f11 (void ) {
40
- ptr < int > x = malloc (sizeof (int ));
41
- free (x );
40
+ ptr < int > x = malloc < int > (sizeof (int ));
41
+ free < int > (x );
42
42
}
43
43
44
44
// Test you can always `free` a `calloc`d ptr
45
45
void f12 (void ) {
46
- ptr < int > x = calloc (1 , sizeof (int ));
47
- free (x );
46
+ ptr < int > x = calloc < int > (1 , sizeof (int ));
47
+ free < int > (x );
48
48
}
49
49
50
50
// Test you can always `free` a `realloc`d ptr
51
51
void f13 (void ) {
52
- ptr < int > x = malloc (sizeof (int ));
52
+ ptr < int > x = malloc < int > (sizeof (int ));
53
53
ptr < int > y = realloc (x , 2 * sizeof (int ));
54
- free (y );
54
+ free < int > (y );
55
55
}
56
56
57
57
// Test you can always `free` a `aligned_alloc`d ptr
58
58
void f14 (void ) {
59
59
ptr < int > x = aligned_alloc (_Alignof(int ), sizeof (int ));
60
- free (x );
60
+ free < int > (x );
61
61
}
62
62
63
63
// Test you can always `free` a `malloc`d array_ptr
64
64
void f21 (void ) {
65
- array_ptr < int > x : count (4 ) = malloc (4 * sizeof (int ));
66
- free (x );
65
+ array_ptr < int > x : count (4 ) = malloc < int > (4 * sizeof (int ));
66
+ free < int > (x );
67
67
}
68
68
69
69
// Test you can always `free` a `calloc`d array_ptr
70
70
void f22 (void ) {
71
- array_ptr < int > x : count (4 ) = calloc (4 , sizeof (int ));
72
- free (x );
71
+ array_ptr < int > x : count (4 ) = calloc < int > (4 , sizeof (int ));
72
+ free < int > (x );
73
73
}
74
74
75
75
// Test you can always `free` a `realloc`d array_ptr
76
76
void f23 (void ) {
77
- array_ptr < int > x : count (4 ) = malloc (4 * sizeof (int ));
77
+ array_ptr < int > x : count (4 ) = malloc < int > (4 * sizeof (int ));
78
78
array_ptr < int > y : count (8 ) = realloc (x , 8 * sizeof (int ));
79
- free (y );
79
+ free < int > (y );
80
80
}
81
81
82
82
// Test you can always `free` a `aligned_alloc`d array_ptr
83
83
void f24 (void ) {
84
84
array_ptr < int > x : count (4 ) = aligned_alloc (_Alignof(int ), 4 * sizeof (int ));
85
- free (x );
85
+ free < int > (x );
86
86
}
0 commit comments