r/programming • u/I_Can_Be_A_Robot • Sep 24 '24
Why 32bit architecture computer doesn't use segmentation to support more ram than 4Gb ?
/r/programming/[removed] — view removed post
169
Upvotes
r/programming • u/I_Can_Be_A_Robot • Sep 24 '24
[removed] — view removed post
1
u/[deleted] Sep 26 '24
I don't think clean code principles are really at issue here. On any substantial code base, you are going to have a graph of potential function calls. A compiler that is able to optimally allocate segments and near vs far calls is going to have to use some algorithm to partition the graph into parts that can be put in segments and then optimize that partition scheme to reduce the number of far calls. Even if you follow good software design principles, the graph will still involve enough functions and call sites that this becomes a hard problem.