It appears that the catopen function is leaking memory. If you place a catopen call inside of a while(1) memory is leaked. Checked this using memprof.
Verified this behavior in 6.0; this does not fail in 6.2 (latest release)... attached is the sample code to reproduce this (thanks to the folks who provided it ...!): g++ -g -Wall -c leak.cpp g++ -o leak leak.o #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <nl_types.h> void leak() { char domainpath[1024];// Domain of resource nl_catd catfd; // File Descriptor for Catalogue memset(domainpath,0,1024); catfd=0; strcpy(domainpath,"ivbas15.mo"); if ((catfd=catopen ((char *)domainpath, 0)) > 0) { int ii=catclose (catfd); } } // main program int main() { while(1) { leak(); sleep(1); } }
Could you do an rpm -qa > rpmlist on the system that does not leak for catopen and e-mail it to me. Thanks, Matt Domencic Merant