-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Reduce allocations for CreateDirectory #61777
Conversation
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsI wanted to see what would it take to have a sys-call that accepts a
|
src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Unix.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Unix.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than passing the VLB by ref (which needs to be done), LGTM.
Co-authored-by: Stephen Toub <stoub@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I meant to approve it, not comment.
LGTM (pending hearing from @AaronRobinsonMSFT in Stephen's question).
src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Unix.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/Interop/Unix/System.Native/Interop.MkDir.cs
Outdated
Show resolved
Hide resolved
cf12ab7
to
ef47025
Compare
I learned a few new tricks from this PR. Thanks @adamsitnik! |
I wanted to see what would it take to have a sys-call that accepts a
ROS<char>
instead ofstring
and after that I've discovered the existence ofValueListBuilder<int>
which allowed me to get rid ofList<int>
allocation.