actually add the test code
[poe-xs-queue-array.git] / leak.pl
CommitLineData
cb6fa8eb
TC
1#!/usr/bin/perl -w
2use POE::XS::Queue::Array;
3my $q = POE::XS::Queue::Array->new;
4# or
5#use POE::Queue::Array;
6#my $q = POE::Queue::Array->new;
7
8print "inital: \n";
9system "ps -o rss -p $$";
10for (1..2000){
11my $id = $q->enqueue($_ % 4, "payload $_");
12$q->dequeue_next;
13}
14system "ps -o rss -p $$";
15for (1..2000){
16my $id = $q->enqueue($_ % 4, "payload $_");
17$q->dequeue_next;
18}
19system "ps -o rss -p $$";
20