@@ -126,7 +126,7 @@ void events_tick_prof(void) {
126126
127127void event_alloc_prof (void ) {
128128 struct equeue q ;
129- equeue_create (& q , 2 * 32 * sizeof ( struct event ) );
129+ equeue_create (& q , 32 * EVENTS_EVENT_SIZE );
130130
131131 prof_loop () {
132132 prof_start ();
@@ -141,7 +141,7 @@ void event_alloc_prof(void) {
141141
142142void event_alloc_many_prof (int count ) {
143143 struct equeue q ;
144- equeue_create (& q , 2 * count * sizeof ( struct event ) );
144+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
145145
146146 void * es [count ];
147147
@@ -166,7 +166,7 @@ void event_alloc_many_prof(int count) {
166166
167167void event_post_prof (void ) {
168168 struct equeue q ;
169- equeue_create (& q , 2 * sizeof ( struct event ) );
169+ equeue_create (& q , EVENTS_EVENT_SIZE );
170170
171171 prof_loop () {
172172 void * e = event_alloc (& q , 0 );
@@ -183,7 +183,7 @@ void event_post_prof(void) {
183183
184184void event_post_many_prof (int count ) {
185185 struct equeue q ;
186- equeue_create (& q , 2 * count * sizeof ( struct event ) );
186+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
187187
188188 for (int i = 0 ; i < count ; i ++ ) {
189189 event_call (& q , no_func , 0 );
@@ -204,7 +204,7 @@ void event_post_many_prof(int count) {
204204
205205void event_post_future_prof (void ) {
206206 struct equeue q ;
207- equeue_create (& q , 2 * sizeof ( struct event ) );
207+ equeue_create (& q , EVENTS_EVENT_SIZE );
208208
209209 prof_loop () {
210210 void * e = event_alloc (& q , 0 );
@@ -222,7 +222,7 @@ void event_post_future_prof(void) {
222222
223223void event_post_future_many_prof (int count ) {
224224 struct equeue q ;
225- equeue_create (& q , 2 * count * sizeof ( struct event ) );
225+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
226226
227227 for (int i = 0 ; i < count ; i ++ ) {
228228 event_call (& q , no_func , 0 );
@@ -244,7 +244,7 @@ void event_post_future_many_prof(int count) {
244244
245245void equeue_dispatch_prof (void ) {
246246 struct equeue q ;
247- equeue_create (& q , 2 * sizeof ( struct event ) );
247+ equeue_create (& q , EVENTS_EVENT_SIZE );
248248
249249 prof_loop () {
250250 event_call (& q , no_func , 0 );
@@ -259,7 +259,7 @@ void equeue_dispatch_prof(void) {
259259
260260void equeue_dispatch_many_prof (int count ) {
261261 struct equeue q ;
262- equeue_create (& q , 2 * count * sizeof ( struct event ) );
262+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
263263
264264 prof_loop () {
265265 for (int i = 0 ; i < count ; i ++ ) {
@@ -276,7 +276,7 @@ void equeue_dispatch_many_prof(int count) {
276276
277277void event_cancel_prof (void ) {
278278 struct equeue q ;
279- equeue_create (& q , 2 * sizeof ( struct event ) );
279+ equeue_create (& q , EVENTS_EVENT_SIZE );
280280
281281 prof_loop () {
282282 int id = event_call (& q , no_func , 0 );
@@ -291,7 +291,7 @@ void event_cancel_prof(void) {
291291
292292void event_cancel_many_prof (int count ) {
293293 struct equeue q ;
294- equeue_create (& q , 2 * count * sizeof ( struct event ) );
294+ equeue_create (& q , count * EVENTS_EVENT_SIZE );
295295
296296 for (int i = 0 ; i < count ; i ++ ) {
297297 event_call (& q , no_func , 0 );
@@ -309,7 +309,7 @@ void event_cancel_many_prof(int count) {
309309}
310310
311311void event_alloc_size_prof (void ) {
312- size_t size = 2 * 32 * sizeof ( struct event ) ;
312+ size_t size = 32 * EVENTS_EVENT_SIZE ;
313313
314314 struct equeue q ;
315315 equeue_create (& q , size );
@@ -321,7 +321,7 @@ void event_alloc_size_prof(void) {
321321}
322322
323323void event_alloc_many_size_prof (int count ) {
324- size_t size = 2 * count * sizeof ( struct event ) ;
324+ size_t size = count * EVENTS_EVENT_SIZE ;
325325
326326 struct equeue q ;
327327 equeue_create (& q , size );
@@ -336,7 +336,7 @@ void event_alloc_many_size_prof(int count) {
336336}
337337
338338void event_alloc_fragmented_size_prof (int count ) {
339- size_t size = 2 * count * sizeof ( struct event ) ;
339+ size_t size = count * EVENTS_EVENT_SIZE ;
340340
341341 struct equeue q ;
342342 equeue_create (& q , size );
0 commit comments