Maximum method size in Java
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Chandra_Patni
Posted On:   Thursday, August 30, 2001 06:04 PM

Why a method size cannot be more than 64K? Lot of jsp engine doesn't work for this reason if the content of jsp is more than 64K.

Re: Maximum method size in Java

Posted By:   Kevin_Riff  
Posted On:   Sunday, September 2, 2001 10:27 AM

It's a limitation of the classfile format. The exceptions table, the line number table and the local variable table all use 16-bit addresses to point into the method's code. Also, most of the branch instructions (all the ifxxx instructions and goto) use 16-bit addresses. Strangely, there is a goto_w instruction that takes a 32-bit address even though the JVM spec points out that the extra 16-bits could never be used.



For more info, read section 4.10 of the JVM specification.

About | Sitemap | Contact