-
-
Notifications
You must be signed in to change notification settings - Fork 9
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 is not properly freed when removing data #7
Conversation
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Thanks to Michael Weimann Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
on a cursory glance there are 2 issues:
|
Exactly. And that is the reason why we are allocating + 200 extra bytes which can be used.
I've already tried that - no difference. |
Then again, the problem is that system allocated memory limit might be more important than the amount of actually utilized memory for some cases. Especially if app is run in environment where exceeding allocated memory limit will get app killed. I have no idea how php manages memory, like does it always allocate new memory and releases/reuses only once each specific page is fully used? Does it reuse partially utilized pages? |
I would say if you bounce off your more or less hard limit for the memory adapter you do not want to go and allocate more memory. that makes me inclined towards wontfix and documentation note. Also, do test with 4kb increments - the average page size |
Closing in favor of #11 |
Description
As of #5, a test was provided to ensure that memory is properly freed after calling
flush
.Thats indeed not the case.
I've played around a bit aswell as in #5 was an assumption that it might be due to the
ArrayObject
by-reference pass of the key/value in AbstractAdapter oflaminas-cache
. I cannot confirm this as I've removed theArrayObject
and its still impossible to get memory freed.I have lacks in knowledge of PHP memory handling and thus just want to provide the failing test here.
Help from the @laminas/technical-steering-committee and all others around would be highly appreciated.
Closing #5