diff options
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_intel.c')
-rw-r--r-- | sys/dev/hwpmc/hwpmc_intel.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/hwpmc/hwpmc_intel.c b/sys/dev/hwpmc/hwpmc_intel.c index 89fd0b1..f7adb6c 100644 --- a/sys/dev/hwpmc/hwpmc_intel.c +++ b/sys/dev/hwpmc/hwpmc_intel.c @@ -162,12 +162,10 @@ pmc_intel_initialize(void) return (NULL); } - pmc_mdep = malloc(sizeof(struct pmc_mdep) + nclasses * - sizeof(struct pmc_classdep), M_PMC, M_WAITOK|M_ZERO); + /* Allocate base class and initialize machine dependent struct */ + pmc_mdep = pmc_mdep_alloc(nclasses); pmc_mdep->pmd_cputype = cputype; - pmc_mdep->pmd_nclass = nclasses; - pmc_mdep->pmd_switch_in = intel_switch_in; pmc_mdep->pmd_switch_out = intel_switch_out; |