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

Added: [zend_]memory_reset_peak_usage() #8151

Merged

Conversation

patrickallaert
Copy link
Contributor

No description provided.

@nikic
Copy link
Member

nikic commented Feb 24, 2022

Looks like a very reasonable addition to me!

@patrickallaert
Copy link
Contributor Author

Does it require any more review/discussion/RFC so that I can commit this?

Zend/tests/memory_reset_peak_usage.phpt Outdated Show resolved Hide resolved
Zend/tests/memory_reset_peak_usage.phpt Outdated Show resolved Hide resolved
NEWS Show resolved Hide resolved
@patrickallaert patrickallaert merged commit 6744009 into php:master Mar 4, 2022
@patrickallaert patrickallaert deleted the zend_memory_reset_peak_usage branch March 4, 2022 12:24
@@ -2175,6 +2175,9 @@ ZEND_END_ARG_INFO()

#define arginfo_memory_get_peak_usage arginfo_memory_get_usage

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_memory_reset_peak_usage, 0, 0, IS_VOID, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks suspicious to me: the stub file from which this file is generated is not modified. I suspect that this was changed manually instead of being generated, which would then be lost on next run of the generator.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you were so right! I'm going to fix this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can git add . -N && git diff --exit-code be added to CI to check if all generated files are in sync after build is run?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would make sense. Would also prevent adding malicious code to generated files like zend_vm_execute.h.

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.

None yet

7 participants