On Wed, 26 Aug 1998 09:59:37 +0100, [EMAIL PROTECTED] wrote: >Help > >I believe there may be a problem with the garbage collector as it >doesn't seem to release all the memory when it is not reference > >(But I could be wrong) > >I have list my version, m/c spec and a simple program > >Many thanks for any help in advance > >Daividm > > >JDK_Version: jdk 1.1.6v2 > JDK_Arch: i386 (x86) > Linux_Dist: Slackware > Linux_Dist_Ver: 2.0.0 > Libc_Ver: 1.8.2 > Ld_Ver: 0.1.2 > Dyn_Java: no > > > I have a very small program that reads the entries in a zip file. The >file is 4.9MB > in size and contains 5302 entries. The program uses both methods for >reading a zip file > nextentry and enumeration. Under the enumeration method it runs out >of memory. > I have tried the program under Borland JBuilder (1 & 2) and (canyou >believe it) > > microsoft J++ and they work fine. > > I have 128MB of real memory and 128MB of swap, and the program still >runs out of memory. I have even force 'gc' but the program still >fails. Something must be wrong with the manangement of the memory. > > That means each entry uses more than 48K. That can't be right. >Considering I ran the JBuilder on 32MB memory Most likely you need to change the default maximum heap size. It is set to a relatively small number. This same behavior happens under the JDK from Sun on Windows too. Try, for example, to use the -mx32m which states that the JVM can use up to 32 meg of memory. Also, the Sun implementation of the GC does not currently compact memory (even though it has indirect pointers) This is not a big issue, but in tight spaces it can make a difference. Anyway, try running your code with -mx32m and see what happens. Michael Sinz -- Director of Research & Development, NextBus Inc. mailto:[EMAIL PROTECTED] --------- http://www.nextbus.com My place on the web ---> http://www.users.fast.net/~michael_sinz