Capacity of Map

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Man4ish
    New Member
    • Mar 2008
    • 151

    #1

    Capacity of Map

    How many elements can be stored ,can we store 10 billion paired entries?
    Because i need to process 10 million entries. Can u suggest me how i can do this.

    Manish Gupta
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    Originally posted by Man4ish
    How many elements can be stored ,can we store 10 billion paired entries?
    Because i need to process 10 million entries. Can u suggest me how i can do this.

    Manish Gupta
    C doesn't impose any limit on how much memory is available to hold variables. However, your hardware has two limits that you need to be aware of:
    1. How big is the address-space of your processor?
    2. How much memory (RAM) is installed in your system?

    You should do a memory usage analysis. You said "10 billion paired entries"; later you said "10 million entries". Is it billion or million? Either way, you need to know the size of each entry in order to estimate how much memory you need.

    If you need more memory than your hardware provides you have a few options:
    1. Change your hardware.
    2. Keep the bulk of your data on disk and swap pieces of it into regular memory.

    Cheers,
    donbock

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      10E6 entries is doable; depending on the size of a single object but 10E9 objects
      on a 32 bit PC is too much; simple math shows you that.

      kind regards,

      Jos

      Comment

      • Man4ish
        New Member
        • Mar 2008
        • 151

        #4
        Originally posted by donbock
        C doesn't impose any limit on how much memory is available to hold variables. However, your hardware has two limits that you need to be aware of:
        1. How big is the address-space of your processor?
        2. How much memory (RAM) is installed in your system?

        You should do a memory usage analysis. You said "10 billion paired entries"; later you said "10 million entries". Is it billion or million? Either way, you need to know the size of each entry in order to estimate how much memory you need.

        If you need more memory than your hardware provides you have a few options:
        1. Change your hardware.
        2. Keep the bulk of your data on disk and swap pieces of it into regular memory.


        Cheers,
        donbock
        10 billion entries are there , how can i swap it into memory, can you give some detailed information or send me the link for the tutorial for swapping for the memory. I am in great need .Please help me.

        manish gupta

        Comment

        • donbock
          Recognized Expert Top Contributor
          • Mar 2008
          • 2427

          #5
          You haven't told us what it takes to "process" each entry.

          1. Can entry processing be accomplished context-free? That is, can you process an entry based solely on its own content without regard to any entries that precede or follow it? If so, then implement a simple loop that reads one entry and then processes it.

          2. If entry processing is context-sensitive, then the problem is potentially much harder to solve. Just how hard depends on the nature of the context-sensitivity.

          3. What is your skill level in C/C++?

          Comment

          Working...