[PATCH] malloc: Fix tst bug in malloc/tst-free-errno-malloc-hugetlb1.
caiyinyu
caiyinyu@loongson.cn
Tue Aug 19 02:14:00 GMT 2025
在 2025/8/18 下午5:46, Wilco Dijkstra 写道:
> Hi caiyinyu,
>
> 在 2025/8/15 上午12:31, Wilco Dijkstra 写道:
>> Hi caiyinyu,
>>
>>> When transparent hugepages (THP) are configured to 32MB on x86/loongarch
>>> systems, the current big_size value may not be sufficiently large to
>>> guarantee that free(ptr) [1] will call munmap(ptr_aligned, big_size).
>> LGTM, and passes on AArch64 too.
>>
>> Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
>>
>>> PS: Without this patch and using 32M THP, there is a about 50% chance
>>> that malloc/tst-free-errno-malloc-hugetlb1 will fail on both x86_64 and
>>> loongarch64.
>> I'm surprised it is affected by THP. It should always use munmap since the default
>> threshold does not change. But I guess somehow munmap doesn't run out of
>> mmap areas?
>> Thank you for your review and feedback.
>>
>> Should we include this patch?
> Yes it looks fine to me. The reviewed-by means you can commit it. Do you have
> commit rights?
OK, i pushed.
> Cheers,
> Wilco
More information about the Libc-alpha
mailing list