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.

Understanding the x64 code models (2012)

49 pointsby dosshellalmost 3 years ago

6 comments

eqvinoxalmost 3 years ago
This article might benefit from a (reasonably visible) note somewhere that none of this is relevant to dynamically allocated memory. While it may be obvious/known to most of the target audience, it could easily be misunderstood by intermediate-level readers.
layer8almost 3 years ago
The article doesn’t address what happens if you pick the wrong (too small) model. I guess the static linker will catch certain cases, and the dynamic linker/loader will catch certain other cases, but will all cases be caught by one of those two, or can the compiled instructions end up being executed, leading to incorrect memory accesses?
评论 #32158487 未加载
kccqzyalmost 3 years ago
I've never seen any real-world example where the large code model is being used on x64. Perhaps it's because I've seen programs where that's necessary. Perhaps the mythical 1.5GB Facebook binary (in 2012) that requires BitTorrent would use a non-small code model?
评论 #32162339 未加载
shadowofneptunealmost 3 years ago
Reminds me of the various models for the original 8086. Far pointers are gone, but having to use registers is a similar tradeoff.
johnklosalmost 3 years ago
Minor nitpick: the author uses "Linux" as a keyword and uses gcc for examples but refers to the architecture as x64, which is a very Microsoft thing and a bit of a misnomer.
评论 #32159524 未加载
评论 #32157822 未加载
aicezalmost 3 years ago
ชวน3ผม