open(PID, "/proc/$$/statm"); return (split(' ', ))[5] * 4; #### my $handling = 0; sub DB::sub { return &$DB::sub if $handling; $handling = 1; scalar $Q->dequeue if $Q->pending > $OPTS{ LINES }; $Q->enqueue( $DB::sub ); $handling = 0; return &$DB::sub; }