from the perspective of language, java.util.List is an interface, under which there are multiple N implementations, the most commonly used are ArrayList and LinkedList and its various inheritance or synchronization implementation (such as Vector/Queue/Stack)
ArrayList inside is to take the array storage, then the upper limit is Integer.MAX_VALUE
LinkedList inside is a LinkedList, theoretically infinite
also, everything in the List is in memory (although you can implement one yourself), so how much you can put depends on the size and type of stuff you’re putting. The
size aspect is easy to calculate, if one object is 1K, then 400,000 will take up at least 400M memory (not counting other usage).
virtual machine memory classification, if it is a common object, generally use the Heap space, if it is a constant or something like string.intern (), then use the Permanent Generation.
in actual development, the default memory size of virtual machine varies according to different virtual machine implementations. The maximum heap size can be adjusted with -xmx when the application is launched, such as adjusting the maximum heap size to 2G:
java -Xmx2048m cn.gefostudio.App
adjust the maximum size of the immortal band to 1G:
java -XX:MaxPermSize=1024m cn.gefostudio.App
Read More:
- How to Fix “the data of store is lost after Vue refreshes the page”
- The registered version of ArcEngine can edit the data in SDE (How to Fix 0x80040356 Error)
- Data analysis to obtain Yahoo stock data: some problems are encountered when using panda datareader (cannot import name ‘is_ list_ Like ‘problem)
- JNI calls the add function of list in Java to flash back
- Cause: java.sql.BatchUpdateException: Unknown column ‘xxx‘ in ‘field list‘
- Struts 2 encapsulates form data into list and map sets
- How to Fix Sklearn ValueError: This solver needs samples of at least 2 classes in the data, but the data
- Use of HQL query.list () is a null pointer exception, but the database can find out the result
- How to Solve BFSVC Error: Could not open the BCD template store.
- How to Fix SQL Error: 1054, SQLState: 42S22 Unknown column ‘markcardex0_.art_service_time’ in ‘field list’
- This relative module was not found: * ./store in ./src/main.js
- Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError
- In the next two years, how do data analysts hang up highly educated engineers? be convinced!
- Common attributes and methods of list and map in Dar
- Can not create the Java virtual machine
- If you open the store in iTunes, you will be prompted to solve the 310 error
- How to exit jshell in Java?
- How to generate UML Diagrams from Java code in Eclipse
- Django + jQuery get data in the form + Ajax send data