Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7878039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:32:50+00:00 2026-06-03T03:32:50+00:00

I am implementing a program that has about 2,000,000 (2 million) arrays each of

  • 0

I am implementing a program that has about 2,000,000 (2 million) arrays each of size 16,512 (128 x 129) of integers. I only need to call 200 arrays at a time (that is 3.3 MB), but I wonder if I can expand the program to have more than 2 million (say 200 million) but I still only need to call 200 arrays at a time. So what is the limit of making more and more arrays while I don’t use more than 200 arrays at a time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:32:52+00:00Added an answer on June 3, 2026 at 3:32 am

    I highly doubt that, unless you’re running on a 64 bit machine with a lot of RAM and a very generous heap.

    Let’s calculate the memory you’ll need for your data:

    2,000,000*128*129*8/1024/1024/1024 = 30.8GB.
    

    You’ll need additional RAM for the JVM, the rest of your program, and the operating system.

    Sounds like a poorly conceived solution to me.

    If you mean “I only have 200 arrays in memory at a time” you can certainly do that, but you’ll have to move the rest out to secondary storage or a relational database. Query for them, use them, GC them. It might not be the best solution, but it’s hard to tell based on the little you’ve posted.

    Update:

    Does “trigger” mean “database trigger”?

    Yes, you can store them on the disk. I can’t guarantee that it’ll perform. Your hard drive can certainly handle 30GB of data; it’s feasible that it’ll accomodate 300GB if it’s large enough.

    Just remember that you have to think about how you’ll manage RAM. GC thrashing might be a problem. A good caching solution might be your friend here. Don’t write one yourself.

    What happens if that hard drive fails and you lose all that data? Do you back it up? Can your app afford to be down if the disk fails? Think about those scenarios, too. Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm implementing a Model View Control program. I have a class User that has
I'm implementing a process elevation helper for Windows. It's a program that will run
I tried implementing a sorting program in mapreduce such that I have just the
I am confused about using php or python for implementing server program . I
Implementing a custom membership provider, there are certain properties such as MinRequiredPasswordLength that only
I have encountered a problem in my program that has me somewhat stumped. I
I am writing a program which has 8 threads. I am implementing a barrier
I implemented a program about calculating the stock values comparing that value in the
I am implementing a haskell program which compares each line of a file with
I'm currently working on a small utility program that only requires a command line

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.