| ??? 01/16/03 19:51 Read: times |
#36593 - RE: Memory models & Keil |
I would say that when calling a function with parameters, the parameters are mapped in the DATA segment.
NO, registers Moreover, the linker doesn't tell me if the DATA segment is full ! Mine (Keil) just goes crazy As these datas are overlayable, I was thinking that when a function isn't in process, the reserved memory for the parameters could be used by an other function. So My DATA segment should be enough ! Mmmm, there is something not clear for me here... OK: function a saves 5 bytes of data and call function b, function b can not overlay the data from function a beacuse it "does not know" which variables func a need after the call to b so the 6 variables for func b are put higher in data, func b now call func c........ The trick is to identify rarely accessed parametres (NOT loop counters and such) and define them as xdata. Another thing I have seen with so called "real C" programmers is function nesting a mile deep, if you have 5 lines of code, you do not need to turn that into a separate function. Erik |
| Topic | Author | Date |
| Memory models & Keil | 01/01/70 00:00 | |
| RE: Memory models & Keil | 01/01/70 00:00 | |
| RE: Memory models & Keil | 01/01/70 00:00 | |
| RE: Memory models & Keil | 01/01/70 00:00 | |
| RE: Memory models & Keil | 01/01/70 00:00 | |
| RE: Memory models & Keil | 01/01/70 00:00 | |
| RE: Memory models & Keil | 01/01/70 00:00 | |
| RE: Memory models & Keil | 01/01/70 00:00 | |
| RE: Memory models & Keil | 01/01/70 00:00 | |
RE: Keil Code (sic) Browser | 01/01/70 00:00 |



