Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103829840
D41268.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
883 B
Referenced Files
None
Subscribers
None
D41268.diff
View Options
diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c
--- a/sys/dev/hwpmc/hwpmc_arm64.c
+++ b/sys/dev/hwpmc/hwpmc_arm64.c
@@ -450,7 +450,7 @@
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
("[arm64,%d] wrong cpu number %d", __LINE__, cpu));
- PMCDBG1(MDP, INI, 1, "arm64-init cpu=%d", cpu);
+ PMCDBG0(MDP, INI, 1, "arm64-pcpu-init");
arm64_pcpu[cpu] = pac = malloc(sizeof(struct arm64_cpu), M_PMC,
M_WAITOK | M_ZERO);
@@ -491,10 +491,16 @@
{
uint32_t pmcr;
+ PMCDBG0(MDP, INI, 1, "arm64-pcpu-fini");
+
pmcr = arm64_pmcr_read();
pmcr &= ~PMCR_E;
arm64_pmcr_write(pmcr);
+ free(arm64_pcpu[cpu]->pc_arm64pmcs, M_PMC);
+ free(arm64_pcpu[cpu], M_PMC);
+ arm64_pcpu[cpu] = NULL;
+
return (0);
}
@@ -605,5 +611,7 @@
void
pmc_arm64_finalize(struct pmc_mdep *md)
{
+ PMCDBG0(MDP, INI, 1, "arm64-finalize");
+ free(arm64_pcpu, M_PMC);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 12:03 AM (21 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14953357
Default Alt Text
D41268.diff (883 B)
Attached To
Mode
D41268: hwpmc_arm64: plug memory leak
Attached
Detach File
Event Timeline
Log In to Comment