php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57270 runkit_function_remove should free up memory used by the function
Submitted: 2006-10-01 11:37 UTC Modified: 2006-10-01 16:06 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: djgrrr at gmail dot com Assigned:
Status: Wont fix Package: runkit (PECL)
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: djgrrr at gmail dot com
New email:
PHP Version: OS:

 

 [2006-10-01 11:37 UTC] djgrrr at gmail dot com
Description:
------------
It would be a lot nicer if runkit_function_remove actually freed up the memory used by the function, rather than just removing it from the function table


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-01 13:21 UTC] pollita@php.net
It does.

You're probably basing your statement on external indicators like get_memory_usage() which are only half-accurate.  When PHP "frees" per-request memory, it only marks it as free for potential reuse later on.  This makes big batches of malloc/free quicker and the rate of fragmentation slower for long running requests.

At the end of a request (or, in some cases, the end of a process space) it performs the actual free.

Short version: runkit is doing its job, PHP just has special way of doing its part.



Unless you're referring to the removal of built-in functions, in which case: The only thing to "free" is the compiled code and since that's going to be back in the function table next request there's really no point in doing that (Not to mention the fact that trying to free portions of program space while in runtime is just a bad idea).
 [2006-10-01 16:06 UTC] djgrrr at gmail dot com
it was actually an error on my part, i was using create_function to make lambda functions but my logic for keeping track of them was wrong

sorry for this
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC