File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -600,7 +600,8 @@ JL_DLLEXPORT void jl_arrayunset(jl_array_t *a, size_t i)
600
600
((jl_value_t * * )a -> data )[i ] = NULL ;
601
601
}
602
602
603
- // at this size and bigger, allocate resized array data with malloc
603
+ // at this size and bigger, allocate resized array data with malloc directly
604
+ // instead of managing them separately as gc objects
604
605
#define MALLOC_THRESH 1048576
605
606
606
607
// Resize the buffer to a max size of `newlen`
@@ -652,13 +653,7 @@ static int NOINLINE array_resize_buffer(jl_array_t *a, size_t newlen)
652
653
}
653
654
else {
654
655
newbuf = 1 ;
655
- if (
656
- #ifdef _P64
657
- nbytes >= MALLOC_THRESH
658
- #else
659
- elsz > 4
660
- #endif
661
- ) {
656
+ if (nbytes >= MALLOC_THRESH ) {
662
657
a -> data = jl_gc_managed_malloc (nbytes );
663
658
jl_gc_track_malloced_array (ptls , a );
664
659
a -> flags .how = 2 ;
You can’t perform that action at this time.
0 commit comments