| Summary: | [libgeom] multiple geom_stats_open/close() leaks memory | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | erik | ||||
| Component: | kern | Assignee: | Alan Somers <asomers> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | allanjude, asomers | ||||
| Priority: | --- | Flags: | asomers:
mfc-stable13+
asomers: mfc-stable12+ |
||||
| Version: | 10.2-RELEASE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Created attachment 222869 [details] Don't leak memory in geom_stats_resync I classic memory leak. The attached patch fixes the problem. However, I think I'm going to do it a different way instead as part of https://reviews.freebsd.org/D28968, which also improves performance. Fixed by ab63da3564e8ab0907f9d8eb565774848ffdadeb and MFCed by 2d1c164591ff5993cfca4b1190a345e40529593f and 8cfe6a4729f598d8a65d846a01184f1fabe2ebc7 |
This program leaks non-RES memory, probably due to MAP_SHARED in the the mmap() reallocation. <code> #include <libgeom.h> int main() { while (1) { geom_stats_open(); geom_stats_close(); } return 0; } </code> # clang bug.c -lgeom && ./a.out