Flat memory model
|
In computer programming, the flat memory model is an approach to organizing memory address space. In this model, a computer application uses at most 2 memory segments, one for the program code and one for data. 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. In 32-bit chips, the application can access up to 4 gigabytes of data. This becomes a problem with large databases and with applications such as video editing.