Re: Java heap space

"Antonello Provenzano" <[email protected]> Fri, 15 Sep 2006 19:31:48 +0200
Newsgroups gmane.comp.db.mckoi
Message-ID <[email protected]>
Unfortunately, the project is dead, that means these valuable
modifications can only be shared between users but they won't never
arrive to be applied to official project repository.

...

On 9/15/06, Gonzalo Díaz <[email protected]> wrote:
> Ooops, looking at the patch code, I realize that
> replacing the enums is what you just did, sorry.
> Then I'll simply wait until they are refelcted on the
> nightly build.
> Thanks
>
>    Gonzalo
>
> --- Gonzalo Díaz <[email protected]> wrote:
>
> > Thank you.
> > Has this patch been applied to the nighty build?
> > Sorry for asking this, I don't know how your build
> > process works. I got the nighty build but the error
> > persists.
> > Are users supposed to chec out from CVS and apply
> > the
> > patch isolatedly instead?
> >
> >    Gonzalo
> >
> > PS: While I am at it, I would like to volunteer for
> > replacing all the "enum" variable names by something
> > else, to see if i can be compiled in 1.5.
> >
> >
> >
> > --- Stefaan A Eeckels <[email protected]>
> > wrote:
> >
> > > On Thu, 14 Sep 2006 21:07:48 +0200
> > > Stefaan A Eeckels <[email protected]> wrote:
> > >
> > > > OK, I can reproduce this. I'd have to look in
> > the
> > > source code to see
> > > > what causes the out of memory error.
> > >
> > > I've found (and fixed) the problem. Two messages
> > > with attachments have
> > > failed to materialize on the list, which might be
> > > caused by the
> > > attachments. Hence this message, with the patch as
> > a
> > > text attachment.
> > >
> > > Here's the text from the previous messages:
> > >
> > > > It's a bug in the code - the  'E\\_%' pattern
> > > causes an endless
> > > > loop in PatternSearch.search. I have a fix for
> > > this that -after
> > > > cursory testing- seems to work.
> > > >
> > > > I attach a patch with the fix as well as a fix
> > for
> > > the compilation
> > > > with Java 5 (McKoi used "enum" as a variable
> > name,
> > > in Java 5 it's a
> > > > reserved word).
> > > >
> > > > Mckoi with the attached patch and compiled with
> > > Java 1.5.008 is
> > > > running quite nicely.
> > >
> > >
> > > --
> > > Stefaan
> > > --
> > > As complexity rises, precise statements lose
> > > meaning,
> > > and meaningful statements lose precision. -- Lotfi
> > > Zadeh
> > > > diff -urw
> > >
> > mckoi1.0.3/src/com/mckoi/database/FunctionTable.java
> > >
> >
> mckoi1.0.3.sae//src/com/mckoi/database/FunctionTable.java
> > > ---
> > >
> > mckoi1.0.3/src/com/mckoi/database/FunctionTable.java
> > > Tue Apr  8 01:55:02 2003
> > > +++
> > >
> >
> mckoi1.0.3.sae//src/com/mckoi/database/FunctionTable.java
> > > Thu Sep 14 22:58:37 2006
> > > @@ -239,12 +239,12 @@
> > >
> > >      // Set up 'whole_table_group' to the list of
> > > all rows in the reference
> > >      // table.
> > > -    RowEnumeration enum =
> > > getReferenceTable().rowEnumeration();
> > > -    whole_table_is_simple_enum = enum instanceof
> > > SimpleRowEnumeration;
> > > +    RowEnumeration theEnum =
> > > getReferenceTable().rowEnumeration();
> > > +    whole_table_is_simple_enum = theEnum
> > instanceof
> > > SimpleRowEnumeration;
> > >      if (!whole_table_is_simple_enum) {
> > >        whole_table_group = new
> > > IntegerVector(getReferenceTable().getRowCount());
> > > -      while (enum.hasMoreRows()) {
> > > -
> > > whole_table_group.addInt(enum.nextRowIndex());
> > > +      while (theEnum.hasMoreRows()) {
> > > +
> > > whole_table_group.addInt(theEnum.nextRowIndex());
> > >        }
> > >      }
> > >
> > > @@ -425,9 +425,9 @@
> > >        // This means there is no grouping, so
> > merge
> > > with entire table,
> > >        int r_count = table.getRowCount();
> > >        row_list = new IntegerVector(r_count);
> > > -      RowEnumeration enum =
> > table.rowEnumeration();
> > > -      while (enum.hasMoreRows()) {
> > > -        row_list.addInt(enum.nextRowIndex());
> > > +      RowEnumeration theEnum =
> > > table.rowEnumeration();
> > > +      while (theEnum.hasMoreRows()) {
> > > +        row_list.addInt(theEnum.nextRowIndex());
> > >        }
> > >      }
> > >
> > > diff -urw
> > >
> >
> mckoi1.0.3/src/com/mckoi/database/NaturallyJoinedTable.java
> > >
> >
> mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java
> > > ---
> > >
> >
> mckoi1.0.3/src/com/mckoi/database/NaturallyJoinedTable.java
> > > Sat Sep 21 21:37:06 2002
> > > +++
> > >
> >
> mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java
> > > Thu Sep 14 22:58:50 2006
> > > @@ -86,9 +86,9 @@
> > >     */
> > >    private static IntegerVector
> > > createLookupRowList(Table t) {
> > >      IntegerVector ivec = new IntegerVector();
> > > -    RowEnumeration enum = t.rowEnumeration();
> > > -    while (enum.hasMoreRows()) {
> > > -      int row_index = enum.nextRowIndex();
> > > +    RowEnumeration theEnum = t.rowEnumeration();
> > > +    while (theEnum.hasMoreRows()) {
> > > +      int row_index = theEnum.nextRowIndex();
> > >        ivec.addInt(row_index);
> > >      }
> > >      return ivec;
> > > diff -urw
> > >
> > mckoi1.0.3/src/com/mckoi/database/PatternSearch.java
> > >
> >
> mckoi1.0.3.sae//src/com/mckoi/database/PatternSearch.java
> > > ---
> > >
> > mckoi1.0.3/src/com/mckoi/database/PatternSearch.java
> > > Mon Feb  3 13:42:58 2003
> > > +++
> > >
> >
> mckoi1.0.3.sae//src/com/mckoi/database/PatternSearch.java
> > > Fri Sep 15 10:17:34 2006
> > > @@ -204,7 +204,6 @@
> > >
> > >      // Look at first character in pattern, if
> > it's
> > > a ONE_CHAR wildcard then
> > >      // check expression and pattern match until
> > > next wild card.
> > > -
> > >      if (pattern.charAt(0) == ONE_CHAR) {
> > >
> > >        // Else step through each character in
> > > pattern and see if it matches up
> > > @@ -382,6 +381,7 @@
> > >
> > >      StringBuffer pre_pattern = new
> > StringBuffer();
> > >      int i = 0;
> > > +    int j = 0;
> > >      boolean finished = i >= pattern.length();
> > >      boolean last_is_escape = false;
> > >
> > > @@ -388,14 +388,24 @@
> > >      while (!finished) {
> > >        char c = pattern.charAt(i);
> > >        if (last_is_escape) {
> > > -        last_is_escape = true;
> > > +        last_is_escape = false;
> > >          pre_pattern.append(c);
> > > +        j++;
> > > +        ++i;
> > > +        if (i >= pattern.length()) {
> > > +          finished = true;
> > >        }
> > > +      }
> > >        else if (c == escape_char) {
> > >          last_is_escape = true;
> > > +        ++i;
> > > +        if (i >= pattern.length()) {
> > > +          finished = true;
> > >        }
> > > +      }
> >
> === message truncated ===
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> ---------------------------------------------------------------
> Mckoi SQL Database mailing list  http://www.mckoi.com/database/
> To unsubscribe, send a message to [email protected]
>
>


---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]