This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Memory consumption of iconv
- From: Oliver Becker <der dot ole dot becker at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Fri, 21 Mar 2014 12:53:25 +0100
- Subject: Memory consumption of iconv
- Authentication-results: sourceware.org; auth=none
Hi,
I am developing a server software which spawns up to thousands of client
processes which use iconv_open (through Qt) to later transform strings between
different encodings. This works like a charm of course but after a while I
recognized that every process used about 1MB (non shared) memory for the iconv
data.
This allone is not that much but If you multiply it by the number of child
processes, I get a huge size of multiple GB. If you take into account that I
use the same locales in every child process this is not easy to understand.
I searched through the iconv/gconv sources but didn't get any farther when
coming to the point where external module functions get called which allocate
the actual data.
So my question is: Do the gconv_* functions which load the actual "big" (some
KB) amount of data for transforming use shared memory segments (like shmget)
and my system just doesn't report it? Or can't they use them because of some
reason?
My thought of using shared memory is to just decrease the overall memory
footprint of my application from ~1-10GB to several MB.
Thanks in advance.
Greetings,
Oliver