Lecture 6: Static Data and Memory Organization (by Trek Palmer) ============================================== Static data ----------- Up to now, you've had to accept that things like .text and .data were 'magical' tokens necessary to placate the assembler. .text signifies the beginning of the text segment. Despite the unusual name, text simply means code. So the text segment is where all your code is stored. .data signifies the beginning of the data segment. Now the data segment doesn't store all your data, only your static data. In Java, you haven't had to really make a distinction between static and dynamic data. But, basically, dynamic data is data whose size is unknown at compile time. Essentially everything you had to use 'new' for in Java. Static data is everything else, all the global data whose sizes you know ahead of time. Although, for now, this distinction between static and dynamic data may seem a little arbitrary, there are good reasons for the distinction and as we explore how systems actually manage memory the reasons should become clearer. The syntax of elements in the data section is fairly standard: