Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/larcenists/larceny
Browse files Browse the repository at this point in the history
  • Loading branch information
WillClinger committed Jul 3, 2017
2 parents 8309025 + bb350e5 commit 8728705
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Rts/Fence/fence-millicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ void EXPORT mc_alloc( word *globals )
assert2( is_fixnum(globals[G_RESULT]) && (int)globals[G_RESULT] >= 0 );

nwords = roundup_walign( nwords );
if ( nwords*sizeof(word) > LARGEST_OBJECT )
signal_exception( globals, EX_ALLOC, 0, 0 );

p = GC_malloc( nwords*sizeof(word) );
assert (p != 0);
globals[ G_RESULT ] = (word)p;
Expand All @@ -145,6 +148,9 @@ void EXPORT mc_alloc( word *globals )
assert2(((word)elim & 7) == 0);

nwords = roundup_walign( nwords );
if ( nwords*sizeof(word) > LARGEST_OBJECT )
signal_exception( globals, EX_ALLOC, 0, 0 );

p = etop;
etop += nwords;
if (etop <= elim) {
Expand Down
6 changes: 6 additions & 0 deletions src/Rts/Standard-C/millicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ void EXPORT mc_alloc( word *globals )
assert2( is_fixnum(globals[G_RESULT]) && (int)globals[G_RESULT] >= 0 );

nwords = roundup_walign( nwords );
if ( nwords*sizeof(word) > LARGEST_OBJECT )
signal_exception( globals, EX_ALLOC, 0, 0 );

p = GC_malloc( nwords*sizeof(word) );
assert (p != 0);
globals[ G_RESULT ] = (word)p;
Expand All @@ -367,6 +370,9 @@ void EXPORT mc_alloc( word *globals )
assert2(((word)elim & 7) == 0);

nwords = roundup_walign( nwords );
if ( nwords*sizeof(word) > LARGEST_OBJECT )
signal_exception( globals, EX_ALLOC, 0, 0 );

p = etop;
etop += nwords;
if (etop <= elim) {
Expand Down

0 comments on commit 8728705

Please sign in to comment.