Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak with 4.0.5.3 (PHP 7.4) #106

Open
kwhat opened this issue Nov 8, 2022 · 0 comments
Open

Memory Leak with 4.0.5.3 (PHP 7.4) #106

kwhat opened this issue Nov 8, 2022 · 0 comments

Comments

@kwhat
Copy link

kwhat commented Nov 8, 2022

There appears to be a memory leak:

Sample Code:

<?php

function test() {
    echo memory_get_usage() . "\n";
    
    $memcache_obj = new Memcache();
    $memcache_obj->addServer('memcached.local' , 11211);
    
    echo memory_get_usage() . "\n";
    
    // None of this seems to make a difference.
    //$memcache_obj->close();
    //unset($memcache_obj);
}

while (true) {
    test();
    sleep(1);
}

Actual Output:

# php -f test.php 
392128
408184

405160
421136

418112
434408

431384
447360

444336
460312

457288
473264

470240
486216

483192
499168

496144
512120

509096
525072

Expected Output:

# php -f test.php 
392128
408184

392128
408184

392128
408184

392128
408184

392128
408184

392128
408184

392128
408184

392128
408184

392128
408184

392128
408184
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant