Mostra notizie nelle discussioni
  • Avatar
    Scritto da
    Non Autenticato
    il 2009-01-27 11:12:00.0 alle 2009-01-27 11:12:00.0
    Java oggi
    No vi prego, oggi no. A bocca storta
    • Avatar
      Scritto da
      Non Autenticato
      il 2009-01-27 11:12:00.0 alle 2009-01-27 11:12:00.0
      Re: Java oggi

      - Scritto da:
      > No vi prego, oggi no. A bocca storta

      sai che la JVM corrente non fa la garbage collection delle istanze di classi anonime?
      • Avatar
        Scritto da
        Non Autenticato
        il 2009-01-27 11:14:00.0 alle 2009-01-27 11:14:00.0
        Re: Java oggi

        - Scritto da:
        >
        > - Scritto da:
        > > No vi prego, oggi no. A bocca storta
        >
        > sai che la JVM corrente non fa la garbage
        > collection delle istanze di classi
        > anonime?

        balle!
        belink?
        • Avatar
          Scritto da
          Non Autenticato
          il 2009-01-27 11:18:00.0 alle 2009-01-27 11:18:00.0
          Re: Java oggi
          - Scritto da:
          >
          > - Scritto da:
          > >
          > > - Scritto da:
          > > > No vi prego, oggi no. A bocca storta
          > >
          > > sai che la JVM corrente non fa la garbage
          > > collection delle istanze di classi
          > > anonime?
          >
          > balle!
          > belink?

          http://blog.headius.com/2008_09_11_archive.html

          The dirty secret of several JVM implementations, Hotspot included, is that there's a separate heap (or a separate generation of the heap) used for special types of data like class definitions, class metadata, and sometimes bytecode or JITted native code. And it couldn't have a scarier name: The Permanent Generation. Except in rare cases, objects loaded into the PermGen are never garbage collected (because they're supposed to be permanent, get it?) and if not used very, very carefully, it will fill up, resulting in the dreaded "java.lang.OutOfMemoryError: PermGen space" that ultimately caused little Billy to go live in the clouds and have tea parties with beautiful mermaids.

          http://npcontemplation.blogspot.com/2009/01/clojur...

          Lambdas are not garbage collected.

          Yes. That means lambdas can be the cause of memory leaks.

          As described by Charles Nutter, each lambda in Clojure is an anonymous class in Java. The problem is that classes are never garbage collected. They reside in a special place called the PermGen.
          • Avatar
            Scritto da
            Non Autenticato
            il 2009-01-27 11:20:00.0 alle 2009-01-27 11:20:00.0
            Re: Java oggi

            - Scritto da:
            > - Scritto da:
            > >
            > > - Scritto da:
            > > >
            > > > - Scritto da:
            > > > > No vi prego, oggi no. A bocca storta
            > > >
            > > > sai che la JVM corrente non fa la garbage
            > > > collection delle istanze di classi
            > > > anonime?
            > >
            > > balle!
            > > belink?
            >
            > http://blog.headius.com/2008_09_11_archive.html
            >
            > The dirty secret of several JVM
            > implementations, Hotspot included, is that
            > there's a separate heap (or a separate generation
            > of the heap) used for special types of data like
            > class definitions, class metadata, and sometimes
            > bytecode or JITted native code. And it couldn't
            > have a scarier name: The Permanent Generation.
            > Except in rare cases, objects loaded into the
            > PermGen are never garbage collected (because
            > they're supposed to be permanent, get it?) and if
            > not used very, very carefully, it will fill up,
            > resulting in the dreaded
            > "java.lang.OutOfMemoryError: PermGen space" that
            > ultimately caused little Billy to go live in the
            > clouds and have tea parties with beautiful
            > mermaids.

            >
            > http://npcontemplation.blogspot.com/2009/01/clojur
            >
            > Lambdas are not garbage collected.
            >
            > Yes. That means lambdas can be the cause of
            > memory
            > leaks.
            >
            > As described by Charles Nutter, each lambda in
            > Clojure is an anonymous class in Java. The
            > problem is that classes are never garbage
            > collected. They reside in a special place called
            > the
            > PermGen.

            traduzione:un programmatore incapace produce memory leaks su java
            • Avatar
              Scritto da
              Non Autenticato
              il 2009-01-27 11:21:00.0 alle 2009-01-27 11:21:00.0
              Re: Java oggi

              - Scritto da:
              >
              > - Scritto da:
              > > - Scritto da:
              > > >
              > > > - Scritto da:
              > > > >
              > > > > - Scritto da:
              > > > > > No vi prego, oggi no. A bocca storta
              > > > >
              > > > > sai che la JVM corrente non fa la garbage
              > > > > collection delle istanze di classi
              > > > > anonime?
              > > >
              > > > balle!
              > > > belink?
              > >
              > > http://blog.headius.com/2008_09_11_archive.html
              > >
              > > The dirty secret of several JVM
              > > implementations, Hotspot included, is that
              > > there's a separate heap (or a separate
              > generation
              > > of the heap) used for special types of data like
              > > class definitions, class metadata, and sometimes
              > > bytecode or JITted native code. And it couldn't
              > > have a scarier name: The Permanent Generation.
              > > Except in rare cases, objects loaded into the
              > > PermGen are never garbage collected (because
              > > they're supposed to be permanent, get it?) and
              > if
              > > not used very, very carefully, it will fill up,
              > > resulting in the dreaded
              > > "java.lang.OutOfMemoryError: PermGen space" that
              > > ultimately caused little Billy to go live in the
              > > clouds and have tea parties with beautiful
              > > mermaids.

              > >
              > >
              > http://npcontemplation.blogspot.com/2009/01/clojur
              > >
              > > Lambdas are not garbage collected.
              > >
              > > Yes. That means lambdas can be the cause of
              > > memory
              > > leaks.
              > >
              > > As described by Charles Nutter, each lambda in
              > > Clojure is an anonymous class in Java. The
              > > problem is that classes are never garbage
              > > collected. They reside in a special place called
              > > the
              > > PermGen.

              >
              > traduzione:un programmatore incapace produce
              > memory leaks su
              > java

              no no no cara, leggi meglio ed eventualmente curati
          • Avatar
            ☺
            Scritto da
            il 2009-01-27 11:34:00.0 alle 2009-01-27 11:34:00.0
            Trollate totali: 5005
            Re: Java oggi
            Basta chiamare System.gc() esplicito.
            • Avatar
              ☺
              Scritto da
              il 2009-01-27 11:43:00.0 alle 2009-01-27 11:43:00.0
              Trollate totali: 42885
              Re: Java oggi

              - Scritto da: achille97
              > Basta chiamare System.gc() esplicito.

              No, non garantisce che il GC entri in funzione.
              Infatti nel codice di TipoStrambo ad un certo punto avevo trovato un mucchio di righe, una dietro l'altra, che richiamavano System.gc() A bocca aperta !

              Scriveva certo codice da mettersi le mani nei capelli, ci credo che poi la RAM non bastava mai A bocca storta
              `"la realta' non e' cosi' terrificante come vogliono farti credere" - Giambo ` - Wakko che cita Giambo
              • Avatar
                ☺
                Scritto da
                il 2009-01-27 11:48:00.0 alle 2009-01-27 11:48:00.0
                Trollate totali: 5005
                Re: Java oggi

                - Scritto da: Giambo
                >
                > - Scritto da: achille97
                > > Basta chiamare System.gc() esplicito.
                >
                > No, non garantisce che il GC entri in funzione.
                > Infatti nel codice di TipoStrambo ad un certo
                > punto avevo trovato un mucchio di righe, una
                > dietro l'altra, che richiamavano System.gc() A bocca aperta
                > !
                >
                > Scriveva certo codice da mettersi le mani nei
                > capelli, ci credo che poi la RAM non bastava mai
                > A bocca storta

                Si demanda al lettore l'esercizio di decommentare le chiamate a turno e verificarne gli effetti.

                package prova;
                public class GCTest {
                    public static void main(String[] args) {
                        for (int i = 0;i<10;i++) {
                            //System.gc();
                            IHidden x = new IHidden() {
                                {System.out.println("init "+this);}
                                public void finalize() {
                                    System.out.println("finalize "+this);}};
                            x = null;
                            //System.gc();
                        }
                        //System.gc();
                    }
                }
                interface IHidden {}
                
                • Avatar
                  ☺
                  Scritto da
                  il 2009-01-27 11:51:00.0 alle 2009-01-27 11:51:00.0
                  Trollate totali: 5005
                  Re: Java oggi

                  - Scritto da: achille97
                  >
                  > - Scritto da: Giambo
                  > >
                  > > - Scritto da: achille97
                  > > > Basta chiamare System.gc() esplicito.
                  > >
                  > > No, non garantisce che il GC entri in funzione.
                  > > Infatti nel codice di TipoStrambo ad un certo
                  > > punto avevo trovato un mucchio di righe, una
                  > > dietro l'altra, che richiamavano System.gc() A bocca aperta
                  > > !
                  > >
                  > > Scriveva certo codice da mettersi le mani nei
                  > > capelli, ci credo che poi la RAM non bastava mai
                  > > A bocca storta
                  >
                  > Si demanda al lettore l'esercizio di decommentare
                  > le chiamate a turno e verificarne gli
                  > effetti.
                  >
                  >
                  > package prova;
                  > public class GCTest {
                  >     public static void main(String[] args) {
                  >         for (int i = 0;i<10;i++) {
                  >             //System.gc();
                  >             IHidden x = new IHidden() {
                  >                 {System.out.println("init
                  > "+this);}
                  >                 public void finalize() {
                  >                     System.out.println("finalize
                  > "+this);}};
                  >             x = null;
                  >             //System.gc();
                  >         }
                  >         //System.gc();
                  >     }
                  > }
                  > interface IHidden {}
                  > 


                  Mi rispondo da solo: il finalize del Class! Triste
                  crappy crappy crappy
<softv>

Pagina generata in 118 millisecondi

Utenti attivi: 9 nell'ultimo minuto, 20 negli ultimi cinque minuti, 46 negli ultimi 15 minuti