This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

aio : implementation for requesting free elements


Hi.

I evaluate the aio for a real-time application. I would like to avoid every allocation and thread creation at run-time.

So i read the implementation of aio in sysdeps/pthread/aio_misc.c

For allocating the requests there are two step :
- 1 - allocate a pool of 8 row of requests
- 2 - allocate an array of 32 or aio_num requests.

My question is why we only take care of the aio_num at the first row (line 137 in the 2.7 release)
8<--------------------------------------------------------
/* Allocate the new row. */
cnt = pool_size == 0 ? optim.aio_num : ENTRIES_PER_ROW;
new_row = (struct requestlist *) calloc (cnt, sizeof (struct requestlist));
8<--------------------------------------------------------


Moreover, the documentation says :
8<--------------------------------------------------------
aio_num
This number provides an estimate on the maximal number of simultaneously enqueued requests.
8<--------------------------------------------------------


But i can't find, in the implementation, any check that limits the number of requests according to aio_num...

Could you tell me if i misunderstood anything please ?

Thank you.

Paul.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]