NetLogo / LevelSpace

This is the LevelSpace extension repository. LevelSpace allows you to run NetLogo models |: from inside NetLogo models :|
Other
19 stars 8 forks source link

Possible to run out of compressed class pointer space #123

Closed qiemem closed 4 years ago

qiemem commented 6 years ago

I've been running out of compressed class pointer space when doing big behaviorspace runs with a large number of child models (500+). A workaround is to just do -XX:-UseCompressedClassPointers, but we probably shouldn't be running out in the first place. Need to look into why we're creating so many classes.

One thought; the child model uses an extension. Maybe because the child models extensions get their own class loader, it's just loading enough copies of those classes to overwhelm it. That seems weird to me though.

It could also just be generated classes.

qiemem commented 4 years ago

It turns out this is due, in fact, to generated classes (though child models that use extensions may have the same problem. Tracing class loading shows that each child model uses an independent (but identical) set of generated classes. There are a couple possible solutions here:

Given the above, I'm going to go for disabling the generator for child models. It's just so much simpler than the other solutions, and requires no modification to NetLogo itself. It's also not even clear that the other solutions would have any benefit over disabling the generator given that I've observed no performance hit.