Thread: When to allocate to external memory RAM or ROM

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    2

    Question When to allocate to external memory RAM or ROM

    When there is both Internal RAM and External RAM in the project and space available in both, how do you choose to allocate variables between External RAM or Internal RAM ? Is there is general rule ?

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    Normally "External" RAM is larger but also with much slower access. So generally if both are available then you would choose "Internal" RAM. However you might choose the external for large arrays, or seldom used variables.

    Jim

  3. #3
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    Btw what is the difference between external and internal RAM?

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by itCbitC View Post
    Btw what is the difference between external and internal RAM?
    Spelling?

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    Normally when talking about internal and external ram you are dealing with micro-controllers. The internal ram is the ram contained in the micro-controller while the external ram is located externally.

    Jim

  6. #6
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by kumarkde View Post
    When there is both Internal RAM and External RAM in the project and space available in both, how do you choose to allocate variables between External RAM or Internal RAM ? Is there is general rule ?
    No. This is entirely dependant on the device(s) in question.
    As Jim mentioned, this is almost always only dealt with embedded devices, like PICs, etc.. I've never heard of a common PC with external RAM that stood on it's own (only ever, that which belonged entirely to an independent device).

  7. #7
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    I've never heard of a common PC with external RAM that stood on it's own
    In the dark ages of PC's, before Windows, to increase memory above 640k, memory cards were often used. These cards were also considered external memory. And since they ran at system bus speed they also had slower access times than the ram on the mother board.

    Jim

  8. #8
    Registered User
    Join Date
    Jul 2011
    Posts
    2
    Thnx Jim. And how about external and Internal Flash memory ? What functions to allocate to what.

  9. #9
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    And how about external and Internal Flash memory ? What functions to allocate to what.
    That depends on your compiler and micro-controller. For the external memory the functions you use would also depend on the compiler, how this memory is connected to the controller and many other factors.

    Jim

  10. #10
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by jimblumberg View Post
    In the dark ages of PC's, before Windows, to increase memory above 640k, memory cards were often used.
    Heh, wudduya know.

    Quote Originally Posted by kumarkde View Post
    And how about external and Internal Flash memory ? What functions to allocate to what.
    As has already been said...
    Quote Originally Posted by Yarin View Post
    This is entirely dependant on the device(s) in question.
    However, if you were to start a new thread, maybe giving more info, like what exactly you're dealing with, you'd get some answers you can use

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to allocate memory using void*?
    By dgs012 in forum C Programming
    Replies: 3
    Last Post: 02-22-2011, 09:34 AM
  2. Allocate memory inside allocated memory block?
    By Heidi_Nayak in forum C Programming
    Replies: 14
    Last Post: 04-15-2009, 04:19 PM
  3. Allocate memory question
    By h3ro in forum C++ Programming
    Replies: 6
    Last Post: 04-12-2007, 01:55 PM
  4. allocate memory dynamically
    By rahulsk1947 in forum C++ Programming
    Replies: 3
    Last Post: 04-08-2007, 04:30 PM
  5. when to allocate memory
    By SAMSAM in forum Windows Programming
    Replies: 3
    Last Post: 01-22-2003, 11:40 PM