@@ -66,18 +66,18 @@ int main(void)
66
66
67
67
pthread_t * threads ;
68
68
if (!(threads = malloc (n_threads * sizeof (pthread_t )))) {
69
- printf ("failed to malloc pthread_t\n" );
69
+ printf ("Failed to allocate pthread_t\n" );
70
70
goto out ;
71
71
}
72
72
73
73
pthread_data_t * * data ;
74
74
if (!(data = malloc (n_threads * sizeof (pthread_data_t * )))) {
75
- printf ("failed to malloc pthread_data_t\n" );
75
+ printf ("Failed to allocate pthread_data_t\n" );
76
76
goto out ;
77
77
}
78
78
for (int i = 0 ; i < n_threads ; i ++ ) {
79
79
if ((data [i ] = alloc_pthread_data ()) == NULL ) {
80
- printf ("failed to malloc pthread_data_t %d\n" , i );
80
+ printf ("Failed to allocate pthread_data_t %d\n" , i );
81
81
goto out ;
82
82
}
83
83
}
@@ -86,7 +86,7 @@ int main(void)
86
86
87
87
void * list ;
88
88
if (!(list = list_global_init (init_size , value_range ))) {
89
- printf ("failed to do list_global_init\n" );
89
+ printf ("Failed to do list_global_init\n" );
90
90
goto out ;
91
91
}
92
92
@@ -136,8 +136,7 @@ int main(void)
136
136
n_move += (data [i ]-> n_move );
137
137
138
138
printf ("\tduration: %d ms\n" , duration );
139
- printf ("\tops/second %lu (%f/s)\n" , n_move ,
140
- n_move * (1000.0 ) / duration );
139
+ printf ("\tops/second %f/s\n" , n_move * (1000.0 ) / duration );
141
140
142
141
for (int i = 0 ; i < n_threads ; i ++ )
143
142
free_pthread_data (data [i ]);
0 commit comments