I use dlopen to load a dynamic library say "lib1.so" and call one exposed function say A1, A1 function allocate a dynamic memory of 100kb using malloc but not deallocate that, in the main function again I all dlclose. [dlopen, call function A1 , dlclose]
I repeate the step say 10 times, Purify report this as memory leak of 1000KB , valgrind reports Indirectly lost 1000KB.
Could you please suggest 100 KB * 10 times = 1000KB , Is a real memory leak? As I have called dlclose, so all memory allocated for dynamic libs are automaticaly freed when we call dlclose?
OS: Linux Programming lan : C