php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60046 Memory leak using Lua
Submitted: 2011-10-12 15:10 UTC Modified: 2012-06-24 10:34 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ghosh at q-one dot com Assigned: laruence (profile)
Status: Closed Package: lua (PECL)
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ghosh at q-one dot com
New email:
PHP Version: OS:

 

 [2011-10-12 15:10 UTC] ghosh at q-one dot com
Description:
------------
There seems to be a memory leak using Lua.

Test script:
---------------
<?
$cnt=0;
$total=100000;
$lastperc=-1;
for ($z=0;$z<$total;$z++) {
  $cnt++;

  $perc=round($cnt/$total*100);
  if ($perc!=$lastperc) {
    echo memory_get_usage(true)." Bytes<br />";
    echo $perc."%<br />";
    $lastperc=$perc;
    flush();
  }
  
  $lua=new Lua();
  $r=$lua->eval("return 2+5");
}
?>

Expected result:
----------------
I would expect the memory usage not rise indefinitely but instead stay constant.

Actual result:
--------------
The memory usage keeps increasing.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-13 00:46 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2012-06-24 10:34 UTC] laruence@php.net
can not reproduce with lua-5.2, assuming this bug has gone.. 
thanks
 [2012-06-24 10:34 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC