@@ -126,7 +126,7 @@ void events_tick_prof(void) {
126
126
127
127
void event_alloc_prof (void ) {
128
128
struct equeue q ;
129
- equeue_create (& q , 2 * 32 * sizeof ( struct event ) );
129
+ equeue_create (& q , 32 * EVENTS_EVENT_SIZE );
130
130
131
131
prof_loop () {
132
132
prof_start ();
@@ -141,7 +141,7 @@ void event_alloc_prof(void) {
141
141
142
142
void event_alloc_many_prof (int count ) {
143
143
struct equeue q ;
144
- equeue_create (& q , 2 * count * sizeof ( struct event ) );
144
+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
145
145
146
146
void * es [count ];
147
147
@@ -166,7 +166,7 @@ void event_alloc_many_prof(int count) {
166
166
167
167
void event_post_prof (void ) {
168
168
struct equeue q ;
169
- equeue_create (& q , 2 * sizeof ( struct event ) );
169
+ equeue_create (& q , EVENTS_EVENT_SIZE );
170
170
171
171
prof_loop () {
172
172
void * e = event_alloc (& q , 0 );
@@ -183,7 +183,7 @@ void event_post_prof(void) {
183
183
184
184
void event_post_many_prof (int count ) {
185
185
struct equeue q ;
186
- equeue_create (& q , 2 * count * sizeof ( struct event ) );
186
+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
187
187
188
188
for (int i = 0 ; i < count ; i ++ ) {
189
189
event_call (& q , no_func , 0 );
@@ -204,7 +204,7 @@ void event_post_many_prof(int count) {
204
204
205
205
void event_post_future_prof (void ) {
206
206
struct equeue q ;
207
- equeue_create (& q , 2 * sizeof ( struct event ) );
207
+ equeue_create (& q , EVENTS_EVENT_SIZE );
208
208
209
209
prof_loop () {
210
210
void * e = event_alloc (& q , 0 );
@@ -222,7 +222,7 @@ void event_post_future_prof(void) {
222
222
223
223
void event_post_future_many_prof (int count ) {
224
224
struct equeue q ;
225
- equeue_create (& q , 2 * count * sizeof ( struct event ) );
225
+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
226
226
227
227
for (int i = 0 ; i < count ; i ++ ) {
228
228
event_call (& q , no_func , 0 );
@@ -244,7 +244,7 @@ void event_post_future_many_prof(int count) {
244
244
245
245
void equeue_dispatch_prof (void ) {
246
246
struct equeue q ;
247
- equeue_create (& q , 2 * sizeof ( struct event ) );
247
+ equeue_create (& q , EVENTS_EVENT_SIZE );
248
248
249
249
prof_loop () {
250
250
event_call (& q , no_func , 0 );
@@ -259,7 +259,7 @@ void equeue_dispatch_prof(void) {
259
259
260
260
void equeue_dispatch_many_prof (int count ) {
261
261
struct equeue q ;
262
- equeue_create (& q , 2 * count * sizeof ( struct event ) );
262
+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
263
263
264
264
prof_loop () {
265
265
for (int i = 0 ; i < count ; i ++ ) {
@@ -276,7 +276,7 @@ void equeue_dispatch_many_prof(int count) {
276
276
277
277
void event_cancel_prof (void ) {
278
278
struct equeue q ;
279
- equeue_create (& q , 2 * sizeof ( struct event ) );
279
+ equeue_create (& q , EVENTS_EVENT_SIZE );
280
280
281
281
prof_loop () {
282
282
int id = event_call (& q , no_func , 0 );
@@ -291,7 +291,7 @@ void event_cancel_prof(void) {
291
291
292
292
void event_cancel_many_prof (int count ) {
293
293
struct equeue q ;
294
- equeue_create (& q , 2 * count * sizeof ( struct event ) );
294
+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
295
295
296
296
for (int i = 0 ; i < count ; i ++ ) {
297
297
event_call (& q , no_func , 0 );
@@ -309,7 +309,7 @@ void event_cancel_many_prof(int count) {
309
309
}
310
310
311
311
void event_alloc_size_prof (void ) {
312
- size_t size = 2 * 32 * sizeof ( struct event ) ;
312
+ size_t size = 32 * EVENTS_EVENT_SIZE ;
313
313
314
314
struct equeue q ;
315
315
equeue_create (& q , size );
@@ -321,7 +321,7 @@ void event_alloc_size_prof(void) {
321
321
}
322
322
323
323
void event_alloc_many_size_prof (int count ) {
324
- size_t size = 2 * count * sizeof ( struct event ) ;
324
+ size_t size = count * EVENTS_EVENT_SIZE ;
325
325
326
326
struct equeue q ;
327
327
equeue_create (& q , size );
@@ -336,7 +336,7 @@ void event_alloc_many_size_prof(int count) {
336
336
}
337
337
338
338
void event_alloc_fragmented_size_prof (int count ) {
339
- size_t size = 2 * count * sizeof ( struct event ) ;
339
+ size_t size = count * EVENTS_EVENT_SIZE ;
340
340
341
341
struct equeue q ;
342
342
equeue_create (& q , size );
0 commit comments