Duplicate :
|
OPERATING SYSTEM(S) FULL JDK VERSION(S): 1.4.2 DESCRIPTION: ---------- BEGIN SOURCE ---------- import java.io.*; import java.net.*; import java.util.*; /** * Class for demonstrating memory leak in Linux JDK. */ public class Test { static public void main(String[] args) throws Exception { for (;;) { NetworkInterface.getNetworkInterfaces(); } } } ---------- END SOURCE ---------- Running this code under a symbolic debugger shows that memory is allocated in native code and not freed. The source of the error is a fix previously issued to Sun - a call to freeif(ifs) was mistakenly coded as free(ifs). [This bug is being submitted as a courtesy, in order to maintain uniformity between Sun & IBM JDKs. It has been fixed in IBM JDKs. Please contact ###@###.### if you have questions.] ###@###.### 2005-04-14 13:42:51 GMT