Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avian can't use more than ~2GB of heap space #48

Open
dicej opened this issue Mar 7, 2013 · 6 comments
Open

Avian can't use more than ~2GB of heap space #48

dicej opened this issue Mar 7, 2013 · 6 comments

Comments

@dicej
Copy link
Member

dicej commented Mar 7, 2013

We're using 32-bit integers (signed in some cases) all over heap.cpp to represent sizes, so we overflow when we get close to 2^31. We should replace these fields and variables with 64-bit integers.

@joshuawarner32
Copy link
Collaborator

I would say it's actually more appropriate to replace it with something like intptr_t, uintptr_t, or size_t. That way, we don't waste space or cycles on 32-bit platforms.

@dicej
Copy link
Member Author

dicej commented Mar 7, 2013

On Wed, 6 Mar 2013, Joshua Warner wrote:

I would say it's actually more appropriate to replace it with something like
intptr_t, uintptr_t, or size_t. That way, we don't waste space or cycles on
32-bit platforms.

Agreed.

@Techcable
Copy link

This makes avian pretty much unusable for me.

@joshuawarner32
Copy link
Collaborator

@Techcable - could you describe your use-case a little more?

Keep in mind that even if we bump the integer sizes, it's unlikely the GC algorithm will scale to large heap sizes anywhere near as well as e.g. hotspot's will.

@Techcable
Copy link

Couldn't you use reference counting and garbage collection?

@joshuawarner32
Copy link
Collaborator

Avian does use garbage collection. Only toy VMs can really get away without it (and PHP, apparently, but that's another story). Essentially, the problem is that the Avian's GC algorithm, which is a fairly basic generational copying collector, hasn't had anywhere near the amount of tuning that many other VM's garbage collectors have had.

Reference counting, in it's most basic form, will likely make things worse in all but the largest heaps, far beyond the capacity of even HotSpot's GC - we're talking hundreds of GB here. There are some variants of reference counting that start to be competitive on smaller heap sizes (what Avian is designed for anyway), but those get dramatically more complicated - so we come back to the matter of how much effort has been poured into development. It hasn't been a priority, and even then, it's not clear it would be a net win.

So, I ask again - could you describe your use-case a little more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants