Flat memory model: Difference between revisions
Content deleted Content added
No edit summary |
(No difference) |
Revision as of 21:22, 1 February 2004
In the flat memory model, a computer application uses at most 2 memory segments, one for the program code and one for data, each of which can be up to 4 gigabytes in size on 32-bit x86-systems, which is sufficient for all but supercomputers. Alternatively, the same segment is used for both code and data, but this is unnecessary since the only area where this may be useful is self-modifying code, which is nowadays considered bad programming style.
The advantage of the flat memory model is that applications do not have to switch segments to access all of their data. However, on the 16-bit 8086 and 80286, it was impractical since this meant that the application could use no more than 64 kilobytes of data.