TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Start Pre-allocating And Stop Worrying

3 pointsby pkalerover 14 years ago

1 comment

semipermeableover 14 years ago
If you're forced to use a platform that requires manual memory management, I'm all for this approach -- either explicitly, or implicitly on a fixed-size stack.<p>Or, use a platform that handles dynamic allocation for you, or that lets you perform "object" based memory management instead of size-based memory management.<p>A similar principle applies to locking: do as little as possible. If you can use a development platform that lets you solve your parallel/concurrent problem naturally without locking (like folks have applied functional programming to do so successfully), do it!