3 ms·
A constant can simply be part of the actual assembly instructions in the code segment. Depending on what type of constant and how large it is, it might just be
by goldenkey 8y ago
A constant can simply be part of the actual assembly instructions in the code segment. Depending on what type of constant and how large it is, it might just be inlined instead of using a memory load. Shared use can also be a compiler heuristic, a large constant used 100 times is more likely to be a shared reference instead of inlined.
- bcaa7f3a8bbc 8y agoAccurate. They don't have to be inside the data segment - they can simply be part of the actual assembly instructions. But more or less, it means the constant is "being written directly into the program". If "program" refers to the object code unambiguously, I don't think this expression is problematic per se.