Skip to content

Commit

Permalink
MSVC fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stedolan committed Jan 8, 2020
1 parent db9a341 commit f3a4232
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/signals_nat.c
Expand Up @@ -71,6 +71,7 @@ void caml_garbage_collection(void)
{
frame_descr* d;
intnat allocsz = 0;
unsigned char* alloc_len;

{ /* Find the frame descriptor for the current allocation */
uintnat h = Hash_retaddr(Caml_state->last_return_address);
Expand All @@ -85,7 +86,7 @@ void caml_garbage_collection(void)

/* Compute the total allocation size at this point,
including allocations combined by Comballoc */
unsigned char* alloc_len = (unsigned char*)(&d->live_ofs[d->num_live]);
alloc_len = (unsigned char*)(&d->live_ofs[d->num_live]);
int i, nallocs = *alloc_len++;
for (i = 0; i < nallocs; i++) {
allocsz += Whsize_wosize(Wosize_encoded_alloc_len(alloc_len[i]));
Expand Down

0 comments on commit f3a4232

Please sign in to comment.