public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
From: "alessandro dot pepi at email dot it" <gcc-bugzilla@gcc.gnu.org> To: java-prs@gcc.gnu.org Subject: [Bug libgcj/14751] New: java program compiled with gcj never release system handle resources allocated by new threads on windows platform Date: Sat, 27 Mar 2004 12:58:00 -0000 [thread overview] Message-ID: <20040327125736.14751.alessandro.pepi@email.it> (raw) A program compiled with gcj on Windows platform (i use the thisiscool distribution) never release system handle resources allocated by new threads until the main thread exit. When a compiled java application create a new thread, the system allocate a new thread handle and some other system handles. When the new thread exits the thread handle is released but 3 other system handles (3 per thread) will be released only when application terminate its execution. Below a java test program that i have comiled whith the latest windows thisiscool distribution of gcj: import java.util.*; public class TestThread { public void createThread(final int j){ Runnable run = new Runnable(){ public void run(){ System.out.println("I am thread number "+j); tsleep(2000,null); }; }; try{ new Thread(run).start(); }catch(Exception e){ System.out.println(e.toString()); }; }; public void Test(){ for (int i = 0;i<100;i++){ createThread(i); tsleep(250,null); }; }; public static void tsleep(long t,String s){ if (s!=null) System.out.println(s); try{ Thread.sleep(t); }catch(Exception e){ System.out.println(e.toString()); } }; public static void main(String[] args) { tsleep(5000,"Begin test : look at handles resource on Task Manager before starting "); TestThread test = new TestThread(); test.Test(); tsleep(1000,"executing garbage collector ..."); Runtime.getRuntime().runFinalization(); Runtime.getRuntime().gc(); tsleep(10000,"End test : now look again at handles resource on Task Manager before exiting "); } }; -- Summary: java program compiled with gcj never release system handle resources allocated by new threads on windows platform Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: alessandro dot pepi at email dot it CC: alessandro dot pepi at email dot it,gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14751
next reply other threads:[~2004-03-27 12:58 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-03-27 12:58 alessandro dot pepi at email dot it [this message] 2004-03-27 15:41 ` [Bug libgcj/14751] [win32] " pinskia at gcc dot gnu dot org 2004-04-29 0:52 ` pinskia at gcc dot gnu dot org 2004-04-29 0:52 ` pinskia at gcc dot gnu dot org 2004-07-03 22:59 ` pinskia at gcc dot gnu dot org 2004-09-10 16:15 ` [Bug libgcj/14751] [win32] thread creation leaks system handle resources ovidr at users dot sourceforge dot net 2004-09-10 18:12 ` ovidr at users dot sourceforge dot net 2004-09-11 19:14 ` cvs-commit at gcc dot gnu dot org 2004-09-11 19:32 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040327125736.14751.alessandro.pepi@email.it \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=java-prs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).