Initjar memory restrictions?

I added ant.jar as a plugin for one of my apps, but jnode crashes first thing in boot:

Found initial jarfile of 8210701b
Loading initjar plugins
Error in bootstrap
java.lang.OutOfMemoryError : Object too lange (2097156)
org.jnode.vm.memmgr.def.DefaultHeapManager!allocObject(202)
...

I had always assumed that we had the full system memory at our disposal. (My machine is at 512Mb.)

What are our restrictions on memory size for this operation?

about Ant plugin

Have you succeed in creating an ant plugin descriptor for JNode ?

I am trying different solutions to create an AntCommand but each time I call it under the shell, I have a NoClassDefFoundError with classes that are supposed to be in ant packages (ant.jar and ant-launcher.jar).

Do you have something to commit to CVS ?

Fabien

Here is the (temporary) solution

Several weeks weeks ago, I had the same problem because I wanted to add some filesystem image (for testing purpose).

Here is how I solved it:
in the class org.jnode.vm.memmgr.def.DefaultHeapManager (JNode-Core),
change the constant DEFAULT_HEAP_SIZE to value higher than 2Mb.
I don't know how the memory is managed but this value limits the size of a single object (because it can't be greater than the heap itself !)

However, my solution is temporary. Maybe it should be configurable.

Fabien

Correct but...

This setting can be adjusted to allow for larger heaps.

I hope that in a new version of the memory manager, we can differentiate between "normal" object (sizes) and large objects. They should be handled diffent.

Ewout

big objects/small objects: 2 GC processing

Several month ago, I read an article on javaworld.com.
It was talking about GC and large or small objects.

They studied the size and life of objects in memory and found that (If I rember well) :
- small objects (temporary variables ...) often exists for a small period of time
- big objects often exists for a long period of time

So, maybe two kind of GC processing ...

Fabien