This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

8052 data memory 128bytes or 256 byte?

Hello,
i am using 8052 in my project and according to datasheet the data memory is 256 bytes but in my code if i exceed 128 bytes the code is not compiled

do i need to use it as x data memory?

please help

Parents
  • Sorry but you fail to see the down sides.
    First. Fragmentation may cause you to have less usable memory then free memory. The PC "Resorces Low message" will not be OK for even a TV set. Embedded system may need to work for years between reboots.

    2. You get to INSURE that there is enough memory. Static allocations are insured by the fact it builds.

    3. Memeroy leaks.

    4. Overhead the malloc code takes up space. The alloc / free takes up time.

    Finally, Beginners use it becuase that is what they used on the PC. They do not even try to avoid it. They do not know there are trade-off involved. If you do need it on a 8052 you should have enough experience to know it is the last choice.

    Very few 8052 project really need it. Or should.

Reply
  • Sorry but you fail to see the down sides.
    First. Fragmentation may cause you to have less usable memory then free memory. The PC "Resorces Low message" will not be OK for even a TV set. Embedded system may need to work for years between reboots.

    2. You get to INSURE that there is enough memory. Static allocations are insured by the fact it builds.

    3. Memeroy leaks.

    4. Overhead the malloc code takes up space. The alloc / free takes up time.

    Finally, Beginners use it becuase that is what they used on the PC. They do not even try to avoid it. They do not know there are trade-off involved. If you do need it on a 8052 you should have enough experience to know it is the last choice.

    Very few 8052 project really need it. Or should.

Children
No data