php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37845 Memory Leak on large # of files
Submitted: 2006-06-19 10:43 UTC Modified: 2006-06-19 10:56 UTC
From: rr at ronrosen dot com Assigned:
Status: Not a bug Package: Streams related
PHP Version: 5.1.4 OS: i386-redhat-linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
32 + 30 = ?
Subscribe to this entry?

 
 [2006-06-19 10:43 UTC] rr at ronrosen dot com
Description:
------------
When a large # of files are opend, written and closed, memory 
is never released. I tested it on windows and linux. Samve 
Problem. Strange thing, when the files are deleted on the 
linux version, the memory is released.

Reproduce code:
---------------
for($i=0;$i<10000;$i++)
{
	$h = fopen('/home/testdir/testfile'.$i.'.html','w');

	fwrite($h,'AAAA');

	fclose($h);


}



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-19 10:51 UTC] rr at ronrosen dot com
one more thing. If the fwrite is eliminated, the mempry issuse 
does not happen.
 [2006-06-19 10:56 UTC] mike@php.net
The OS decides when memory mapped files are released.
 [2006-06-19 10:56 UTC] mike@php.net
.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 17:01:30 2024 UTC