Post

Replies

Boosts

Views

Activity

Reply to memory leak in dlopen / dlcose, or user error?
Hi Quinn, thanks for your response. I can confirm that with your code, I don't see an unbounded increase in memory usage. I've made some edits, and have produced two minimal examples, based on yours, that do show unbounded memory usage. LeakTestCtor.c (attached) is a modification to your library code that adds a library constructor and destructor function. LeakTestGlobal.cpp (attached) adds a global vector. Neither are leaking. Can you reproduce the increasing memory usage? Thanks, Chris LeakTestGlobal.cpp LeakTestCtor.c
Jan ’26
Reply to memory leak in dlopen / dlcose, or user error?
Bug created: FB21892034 Thanks for all your help on this, Quinn!
Replies
Boosts
Views
Activity
Feb ’26
Reply to memory leak in dlopen / dlcose, or user error?
Hi Quinn, thanks for your response. I can confirm that with your code, I don't see an unbounded increase in memory usage. I've made some edits, and have produced two minimal examples, based on yours, that do show unbounded memory usage. LeakTestCtor.c (attached) is a modification to your library code that adds a library constructor and destructor function. LeakTestGlobal.cpp (attached) adds a global vector. Neither are leaking. Can you reproduce the increasing memory usage? Thanks, Chris LeakTestGlobal.cpp LeakTestCtor.c
Replies
Boosts
Views
Activity
Jan ’26
Reply to memory leak in dlopen / dlcose, or user error?
Thanks for the response! We've now tried this on macOS Sequoia Version 15.6.1 (24G90) (arm64) and still see the increasing memory usage. I appreciate that dlclose might not unload the library, but I wouldn't expect it to then consume more resources on a reload.
Replies
Boosts
Views
Activity
Nov ’25