Write Program Java Dynamically Allocates Large Integer Array Start Array Least 100 Million Q37039114

Write a program in Java that dynamically allocates a largeinteger array.

▪ Start with an array with at least 100 million elements.Increase the size (number of elements) of the array until anexception is generated. The operating system should generate ahardware interrupt when the amount of user addressable space hasbeen exhausted. Java should pass this interrupt on as anexception.

▪ How much memory was used before the exception was generated?You can calculate the number of bytes by multiplying thesizeof(int) times the total number of integers requested. Youshould print out this value each time the number of elments wasincreased.

▪ Is naively running out of

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.