BDB
view release on metacpan or search on metacpan
812813814815816817818819820821822823824825826827828829830831832yet, switch to a more capable platform.
=head1 MEMORY USAGE
Per-request usage:
Each aio request uses - depending on your architecture - around 100-200
bytes of memory. In addition, stat requests need a stat buffer (possibly
a few hundred bytes), readdir requires a result buffer and so on. Perl
scalars and other data passed into aio requests will also be locked and
will consume memory till the request has entered the done state.
This is not awfully much, so queuing lots of requests is not usually a
problem.
Per-thread usage:
In the execution phase, some aio requests require more memory for
temporary buffers, and each thread requires a stack and other data
structures (usually around 16k-128k, depending on the OS).
224225226227228229230231232233234235236237238239240241242243244245246247248249}
static
int
next_pri = DEFAULT_PRI + PRI_BIAS;
static unsigned
int
started, idle, wanted;
/* worker threads management */
static xmutex_t wrklock = X_MUTEX_INIT;
typedef struct worker {
/* locked by wrklock */
struct worker
*prev
,
*next
;
xthread_t tid;
/* locked by reslock, reqlock or wrklock */
bdb_req req; /* currently processed request */
void
*dbuf
;
DIR
*dirp
;
} worker;
static worker wrk_first = {
&wrk_first
,
&wrk_first
, 0 };
static void worker_clear (worker
*wrk
)
{
}
682683684685686687688689690691692693694695696697698699700701702
Win32 note: there is
no
fork
on win32, and perls emulation of it is too
better yet, switch to a more capable platform.
MEMORY USAGE
Per-request usage:
Each aio request uses - depending on your architecture -
around
100-200
bytes of memory. In addition,
stat
requests need a
stat
buffer (possibly
a few hundred bytes),
readdir
requires a result buffer and so on. Perl
scalars and other data passed into aio requests will also be locked and
will consume memory till the request
has
entered the done state.
This is not awfully much, so queuing lots of requests is not usually a
problem.
Per-thread usage:
temporary buffers, and
each
thread requires a stack and other data
structures (usually
around
16k-128k, depending on the OS).
( run in 0.252 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )