Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_linker.c
Show First 20 Lines • Show All 1,986 Lines • ▼ Show 20 Lines | linker_hwpmc_list_objects(void) | ||||
/* Allocate nmappings + 1 entries. */ | /* Allocate nmappings + 1 entries. */ | ||||
kobase = malloc((nmappings + 1) * sizeof(struct pmckern_map_in), | kobase = malloc((nmappings + 1) * sizeof(struct pmckern_map_in), | ||||
M_LINKER, M_WAITOK | M_ZERO); | M_LINKER, M_WAITOK | M_ZERO); | ||||
i = 0; | i = 0; | ||||
TAILQ_FOREACH(lf, &linker_files, link) { | TAILQ_FOREACH(lf, &linker_files, link) { | ||||
/* Save the info for this linker file. */ | /* Save the info for this linker file. */ | ||||
kobase[i].pm_file = lf->filename; | kobase[i].pm_file = lf->pathname; | ||||
kobase[i].pm_address = (uintptr_t)lf->address; | kobase[i].pm_address = (uintptr_t)lf->address; | ||||
i++; | i++; | ||||
} | } | ||||
sx_sunlock(&kld_sx); | sx_sunlock(&kld_sx); | ||||
KASSERT(i > 0, ("linker_hpwmc_list_objects: no kernel objects?")); | KASSERT(i > 0, ("linker_hpwmc_list_objects: no kernel objects?")); | ||||
/* The last entry of the malloced area comprises of all zeros. */ | /* The last entry of the malloced area comprises of all zeros. */ | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |