mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
vm_phys_early_alloc: mem_index is only used under #ifdef NUMA.
Possibly mem_index should just reuse biggestone since this loop is already reusing biggestsize.
This commit is contained in:
parent
a7e1a58554
commit
2e7838ae84
1 changed files with 5 additions and 2 deletions
|
|
@ -1660,7 +1660,10 @@ vm_phys_early_add_seg(vm_paddr_t start, vm_paddr_t end)
|
|||
vm_paddr_t
|
||||
vm_phys_early_alloc(int domain, size_t alloc_size)
|
||||
{
|
||||
int i, mem_index, biggestone;
|
||||
#ifdef NUMA
|
||||
int mem_index;
|
||||
#endif
|
||||
int i, biggestone;
|
||||
vm_paddr_t pa, mem_start, mem_end, size, biggestsize, align;
|
||||
|
||||
KASSERT(domain == -1 || (domain >= 0 && domain < vm_ndomains),
|
||||
|
|
@ -1672,10 +1675,10 @@ vm_phys_early_alloc(int domain, size_t alloc_size)
|
|||
* the phys_avail selection below.
|
||||
*/
|
||||
biggestsize = 0;
|
||||
mem_index = 0;
|
||||
mem_start = 0;
|
||||
mem_end = -1;
|
||||
#ifdef NUMA
|
||||
mem_index = 0;
|
||||
if (mem_affinity != NULL) {
|
||||
for (i = 0;; i++) {
|
||||
size = mem_affinity[i].end - mem_affinity[i].start;
|
||||
|
|
|
|||
Loading…
Reference in a new issue