Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108555397
D41269.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
955 B
Referenced Files
None
Subscribers
None
D41269.diff
View Options
diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c
--- a/sys/dev/hwpmc/hwpmc_armv7.c
+++ b/sys/dev/hwpmc/hwpmc_armv7.c
@@ -414,7 +414,7 @@
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
("[armv7,%d] wrong cpu number %d", __LINE__, cpu));
- PMCDBG1(MDP, INI, 1, "armv7-init cpu=%d", cpu);
+ PMCDBG0(MDP, INI, 1, "armv7-pcpu-init");
armv7_pcpu[cpu] = pac = malloc(sizeof(struct armv7_cpu), M_PMC,
M_WAITOK|M_ZERO);
@@ -450,6 +450,8 @@
{
uint32_t pmnc;
+ PMCDBG0(MDP, INI, 1, "armv7-pcpu-fini");
+
pmnc = cp15_pmcr_get();
pmnc &= ~ARMV7_PMNC_ENABLE;
cp15_pmcr_set(pmnc);
@@ -459,6 +461,10 @@
cp15_pminten_clr(pmnc);
cp15_pmovsr_set(pmnc);
+ free(armv7_pcpu[cpu]->pc_armv7pmcs, M_PMC);
+ free(armv7_pcpu[cpu], M_PMC);
+ armv7_pcpu[cpu] = NULL;
+
return 0;
}
@@ -529,5 +535,7 @@
void
pmc_armv7_finalize(struct pmc_mdep *md)
{
+ PMCDBG0(MDP, INI, 1, "armv7-finalize");
+ free(armv7_pcpu, M_PMC);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 7:33 AM (2 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16189461
Default Alt Text
D41269.diff (955 B)
Attached To
Mode
D41269: hwpmc_armv7: plug memory leak
Attached
Detach File
Event Timeline
Log In to Comment