Skip to content

Update memory.md#33937

Merged
Rick-Anderson merged 1 commit into
dotnet:mainfrom
dalibormesaric:patch-1
Nov 6, 2024
Merged

Update memory.md#33937
Rick-Anderson merged 1 commit into
dotnet:mainfrom
dalibormesaric:patch-1

Conversation

@dalibormesaric

@dalibormesaric dalibormesaric commented Oct 26, 2024

Copy link
Copy Markdown
Contributor

Updated size of string from 10KB to 20KB according to

Note: Strings are stored as UTF-16 characters in .NET so each char takes two bytes in memory.

but also after running

Console.WriteLine(
    System.Text.Encoding.Unicode.GetByteCount(
        new String('x', 10 * 1024)));

// Answer: 20480

Fixes #34052

Internal previews

📄 File 🔗 Preview link
aspnetcore/performance/memory.md Memory management and garbage collection (GC) in ASP.NET Core

@dalibormesaric

Copy link
Copy Markdown
Contributor Author

Also created sebastienros/memoryleak#8

@guardrex
guardrex requested a review from tdykstra October 26, 2024 12:51
@Rick-Anderson

Copy link
Copy Markdown
Contributor

Also created sebastienros/memoryleak#8

Issues should be created in this repo. I created #34052 for you.

Thanks so much for this valuable contribution.

Thanks for the contribution. Be sure to check out your name as a contributor about the 3rd of next month on the What's new page in the Community contributors section at the bottom.

Check out is:issue is:open label:"code help wanted" " and is:open is:issue label:"Good first issue" if you're interested it writing some code. We'll take care of the writing.

@Rick-Anderson
Rick-Anderson merged commit 73d14c8 into dotnet:main Nov 6, 2024
@dalibormesaric
dalibormesaric deleted the patch-1 branch November 23, 2024 11:24
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.

Fix string size

2 participants