Lines Matching defs:nr_cpus
114 * @nr_cpus Number of CPUs. This is the real number of available CPUs + 1
118 void salloc_mp_struct(int nr_cpus)
124 if ((st_cpu[i] = (struct stats_cpu *) malloc(STATS_CPU_SIZE * nr_cpus))
129 memset(st_cpu[i], 0, STATS_CPU_SIZE * nr_cpus);
131 if ((st_irq[i] = (struct stats_irq *) malloc(STATS_IRQ_SIZE * nr_cpus))
136 memset(st_irq[i], 0, STATS_IRQ_SIZE * nr_cpus);
138 if ((st_irqcpu[i] = (struct stats_irqcpu *) malloc(STATS_IRQCPU_SIZE * nr_cpus * irqcpu_nr))
143 memset(st_irqcpu[i], 0, STATS_IRQCPU_SIZE * nr_cpus * irqcpu_nr);
145 if ((st_softirqcpu[i] = (struct stats_irqcpu *) malloc(STATS_IRQCPU_SIZE * nr_cpus * softirqcpu_nr))
150 memset(st_softirqcpu[i], 0, STATS_IRQCPU_SIZE * nr_cpus * softirqcpu_nr);
153 if ((cpu_bitmap = (unsigned char *) malloc((nr_cpus >> 3) + 1)) == NULL) {
157 memset(cpu_bitmap, 0, (nr_cpus >> 3) + 1);