Skip to content
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

Extension bypasses Zend Memory Management (ZMM) #42

Open
yoraze opened this issue Dec 18, 2024 · 2 comments
Open

Extension bypasses Zend Memory Management (ZMM) #42

yoraze opened this issue Dec 18, 2024 · 2 comments

Comments

@yoraze
Copy link

yoraze commented Dec 18, 2024

This caused by usage of new/delete operators that uses malloc/free instead of emalloc/efree that ZendAPI provides
PalettedBlockArray objects bypasses ZMM and this causes noticable incorrect memory consuption calculation in PHP
^ You can also just type "status" in Console on Windows and compare memory usage with taskmanager
That problem also may cause slight perfomance degrade but I dont sure about it

Any comments on this or we just should ignore this problem?

@dktapps
Copy link
Member

dktapps commented Dec 18, 2024

I'm aware of the issue, but it's complicated to fix and probably not worth it. Performance is pretty much irrelevant considering the low frequency of allocations.

Using ZMM comes with its own problems such as thread sharing restrictions, which, considering that I'd had plans to enable sharing PalettedBlockArrays between threads without copying, is a restriction I don't like.

@dktapps
Copy link
Member

dktapps commented Dec 18, 2024

I'll also point out that PHP memory usage reporting is basically useless in PM anyway since it doesn't count memory from anything but the current thread. You have to look at system memory stats anyway. We don't do this on Windows because there's a significant lag time for the commands needed to retrieve the stats.

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

No branches or pull requests

2 participants