mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
misc: Add __get_nprocs_sched
This is an internal function meant to return the number of avaliable processor where the process can scheduled, different than the __get_nprocs which returns a the system available online CPU. The Linux implementation currently only calls __get_nprocs(), which in tuns calls sched_getaffinity. Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
@ -878,7 +878,7 @@ arena_get2 (size_t size, mstate avoid_arena)
|
||||
narenas_limit = mp_.arena_max;
|
||||
else if (narenas > mp_.arena_test)
|
||||
{
|
||||
int n = __get_nprocs ();
|
||||
int n = __get_nprocs_sched ();
|
||||
|
||||
if (n >= 1)
|
||||
narenas_limit = NARENAS_FROM_NCORES (n);
|
||||
|
Reference in New Issue
Block a user