Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow min size of VMArrayInstance to be 4 elems.
  • Loading branch information
donaldh committed Oct 4, 2013
1 parent 5ef6bcc commit 5cab6ef
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -15,6 +15,8 @@ public class VMArrayInstance extends SixModelObject {
public int start;
public SixModelObject[] slots;

public static final int INIT_SIZE = 4;

public SixModelObject at_pos_boxed(ThreadContext tc, long index) {
if (index < 0) {
index += elems;
Expand Down Expand Up @@ -75,7 +77,7 @@ private void set_size_internal(ThreadContext tc, long n) {
if (ssize < 8192) {
ssize *= 2;
if (n > ssize) ssize = n;
if (ssize < 8) ssize = 8;
if (ssize < INIT_SIZE) ssize = INIT_SIZE;
}
else {
ssize = (n + 0x1000) & ~0xfff;
Expand Down

0 comments on commit 5cab6ef

Please sign in to comment.