-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce stack usage in php_resolve_path()
tsrm_realpath() internally always allocates a string. If the out parameter is provided it gets copied there and freed. What we were doing here was to first copy the path from the allocated string to a stack buffer, and then copy it from the stack buffer to a zend_string. We might as well save one copy and one buffer.
- Loading branch information
Showing
1 changed file
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters