IssueRaiser

So, how much of those gains comes from using the equivalent of malloc/free (FTA: “The most dangerous ArrayPool mistake is forgetting...

So, how much of those gains comes from using the equivalent of malloc/free (FTA: “The most dangerous ArrayPool mistake is forgetting to return arrays. Unlike regular arrays that get garbage collected automatically, pooled arrays must be explicitly returned” ), and how much from having pools of a memory blocks of various sizes? If the former is a significant part, wouldn’t it be useful to just add that to .NET? One would need runtime guards to prevent use after free, but I think at least the “alloc temp buffer for use by function” case isn’t a nightmare to implement (for those working on the .NET runtime)

Posted by Someone on Jan 16, 2026, 1:42 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

hackernews (Software)

So, how much of those gains comes from using the equivalent of malloc/free (FTA: “The most dangerous ArrayPool mistake is forgetting...

SomeoneJan 16, 2026, 1:42 PM

So, how much of those gains comes from using the equivalent of malloc/free (FTA: “The most dangerous ArrayPool mistake is forgetting to return arrays. Unlike regular arrays that get garbage collected automatically, pooled arrays must be explicitly returned” ), and how much from having pools of a memory blocks of various sizes? If the former is a significant part, wouldn’t it be useful to just add that to .NET? One would need runtime guards to prevent use after free, but I think at least the “alloc temp buffer for use by function” case isn’t a nightmare to implement (for those working on the .NET runtime)

Comments (0)

No comments yet. Start the discussion.

Comment on this issue