We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a52d7c5 commit 485e804Copy full SHA for 485e804
1 file changed
Src/heap.c
@@ -154,7 +154,7 @@ HeapAlloc_Gen(Heap *heap)
154
}
155
156
heap->hunks[heap->num_hunks] =
157
- (void *) emalloc(heap->chnk_sze * heap->ch_ratio);
+ (void *) emalloc((size_t) heap->chnk_sze * (size_t) heap->ch_ratio);
158
159
#ifdef DEBUG
160
printf("2 chunk allocate at %p -- %d * %d bytes\n",
@@ -171,7 +171,7 @@ HeapAlloc_Gen(Heap *heap)
171
+ (heap->chnk_sze * chnk)));
172
173
} else
174
- { heap->hunks[0] = (void *) emalloc(heap->chnk_sze * heap->ch_ratio);
+ { heap->hunks[0] = (void *) emalloc((size_t) heap->chnk_sze * (size_t) heap->ch_ratio);
175
176
printf("1 chunk allocate at %p -- %d * %d bytes\n",
177
heap->hunks[0], heap->chnk_sze, heap->ch_ratio);
0 commit comments