Skip to content

Conversation

@cmb69
Copy link
Member

@cmb69 cmb69 commented Dec 7, 2021

Whenever we reuse or delete a cached_chunk, we need to adjust the
memory stats like we do when allocating or deleting a non cached chunk.

Whenever we reuse or delete a `cached_chunk`, we need to adjust the
memory stats like we do when allocating or deleting a non cached chunk.
@cmb69
Copy link
Member Author

cmb69 commented Dec 7, 2021

@dstogov, do you see any issues with this fix?

@dstogov
Copy link
Member

dstogov commented Dec 8, 2021

Zend MM keeps in real_size the amount of allocated system memory. This includes the allocated cached pages, as we don't return them to system. This counting was done on purpose. Accurate information about memory used by PHP application is available in size.

I don't see a big reason to change this.

@cmb69
Copy link
Member Author

cmb69 commented Dec 8, 2021

Thanks for the explanation, @dstogov. And of course, you're right! I'll come up with another PR which does not change real_size.

@cmb69 cmb69 closed this Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants