Re: INTERN_UTF8CONSTS

Date view Thread view Subject view Author view

From: Godmar Back (gback@cs.utah.edu)
Date: Fri Dec 18 1998 - 16:47:13 EST


Sure Archie, go ahead. string.c is all yours.
Basically, the underlying premise would be that both utf8 and strings
are immutable, correct?

I would like you to be able to pass a test like Edouard's (see his
mail from Sep 1):

    I have write a String intern hog like:

        long nr = 0;
        while(true)
             (Long.toString(nr++)).intern();

    and run it with:
    jdk-1.1.5: throw OutOfMemoryException
    jre-1.1.6: panic string table overflow
    jre-1.2beta4: work as a charme: they may be use WearReference from
    the new package java.lang.ref :-(

Actually, come to think of it: java.lang.String and Utf8 are two
different pairs of shoes. One uses (java)char[] arrays, the other
zero-terminated (c)char* strings.

So, I think you'll need two tables (which is what string.c actually did
with utf8hash.) Ideally, we would make it two different files too.

        - Godmar


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:23 EDT