!395 malloc: use __get_nprocs replace __get_nprocs_sched

From: @liqingqing_1229 
Reviewed-by: @yang_yanchao 
Signed-off-by: @yang_yanchao
This commit is contained in:
openeuler-ci-bot 2022-03-12 10:34:24 +00:00 committed by Gitee
commit d8111aeced
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 30 additions and 1 deletions

View File

@ -65,7 +65,7 @@
##############################################################################
Name: glibc
Version: 2.35
Release: 5
Release: 6
Summary: The GNU libc libraries
License: %{all_license}
URL: http://www.gnu.org/software/glibc/
@ -94,6 +94,7 @@ Source8: testsuite_whitelist.%{_target_cpu}
#Patch9009: 0008-add-pause_nocancel_2_17.patch
#Patch9010: 0009-add-unwind-with-longjmp.patch
Patch9011: use-region-to-instead-of-country-for-extract-timezon.patch
Patch9012: malloc-use-__get_nprocs-replace-__get_nprocs_sched.patch
Obsoletes: nscd < 2.35
Provides: ldconfig rtld(GNU_HASH) bundled(gnulib)
@ -1164,6 +1165,9 @@ fi
%endif
%changelog
* Sat Mar 12 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-6
- malloc: use __get_nprocs replace __get_nprocs_sched.
* Wed Mar 2 2022 Qingqing Li <liqingqing3@huawei.com> - 2.35-5
- add chrpath to build requires for removing RPATH/RUNPATH

View File

@ -0,0 +1,25 @@
From f5545d74d6dc4d5036bee6a91cda14a51e2a0676 Mon Sep 17 00:00:00 2001
From: Yang Yanchao <yangyanchao6@huawei.com>
Date: Sat, 12 Mar 2022 15:30:17 +0800
Subject: [PATCH] malloc: use __get_nprocs replace __get_nprocs_sched.
---
malloc/arena.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/malloc/arena.c b/malloc/arena.c
index f1f0af86..66748463 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -879,7 +879,7 @@ arena_get2 (size_t size, mstate avoid_arena)
narenas_limit = mp_.arena_max;
else if (narenas > mp_.arena_test)
{
- int n = __get_nprocs_sched ();
+ int n = __get_nprocs ();
if (n >= 1)
narenas_limit = NARENAS_FROM_NCORES (n);
--
2.33.0