4
use Test::More tests => 21;
9
my $server = new_memcached();
10
my $sock = $server->sock;
11
my $value = "B"x66560;
14
for ($key = 0; $key < 10; $key++) {
15
print $sock "set key$key 0 2 66560\r\n$value\r\n";
16
is (scalar <$sock>, "STORED\r\n", "stored key$key");
19
#print $sock "stats slabs"
20
my $first_stats = mem_stats($sock, "slabs");
21
my $first_malloc = $first_stats->{total_malloced};
25
for ($key = 10; $key < 20; $key++) {
26
print $sock "set key$key 0 2 66560\r\n$value\r\n";
27
is (scalar <$sock>, "STORED\r\n", "stored key$key");
30
my $second_stats = mem_stats($sock, "slabs");
31
my $second_malloc = $second_stats->{total_malloced};
34
is ($second_malloc, $first_malloc, "Memory grows..")