Skip to content

Commit a0e35b5

Browse files
committed
Minor refactoring of jl_gc_classify_pools
1 parent 29f5993 commit a0e35b5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/mmtk-gc.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,11 @@ static inline void malloc_maybe_collect(jl_ptls_t ptls, size_t sz)
5656
// allocation
5757
int jl_gc_classify_pools(size_t sz, int *osize)
5858
{
59-
if (sz > GC_MAX_SZCLASS)
60-
return -1;
59+
if (sz > GC_MAX_SZCLASS)
60+
return -1; // call big alloc function
6161
size_t allocsz = sz + sizeof(jl_taggedvalue_t);
62-
int klass = jl_gc_szclass(allocsz);
6362
*osize = LLT_ALIGN(allocsz, 16);
64-
return (int)(intptr_t)(&((jl_ptls_t)0)->heap.norm_pools[klass]);
63+
return 0; // use MMTk's fastpath logic
6564
}
6665

6766
// malloc wrappers, aligned allocation

0 commit comments

Comments
 (0)