Skip to content

Commit ec3b2b1

Browse files
committed
add extra bytes to rvm_calcfmem()'s output
1 parent f0d5ec4 commit ec3b2b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rvm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ struct rvm rvm_new(void *mem, rvm_uint memsz)
5050

5151
rvm_uint rvm_calcfmem(rvm_uint sz)
5252
{
53-
/* align up + trap instruction */
54-
return (sz + (RVM_INLN << 1) - 1) & ~(RVM_INLN - 1);
53+
/* align up + trap instruction + extra */
54+
return ((sz + (RVM_INLN << 1) - 1) & ~(RVM_INLN - 1)) + 32;
5555
}
5656

5757
const char *rvm_strstat(signed e)

0 commit comments

Comments
 (0)