|  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
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
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:
Bug Type:
From: djgrrr at gmail dot com
New email:
PHP Version: OS:


 [2006-10-01 11:37 UTC] djgrrr at gmail dot com
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-01 13:21 UTC]
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-2020 The PHP Group
All rights reserved.
Last updated: Tue Nov 24 14:01:23 2020 UTC