Memory Utilization of Uninitialized data structures in code
"Srivastava, Namburi (IE10)" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <0BE793E111BFFF449DFB3207E2977BE0257156@IE10EV812.global.ds.honeywell.com> |
Hi, I generated the elf files for the libnetsnmp.a, libnetsnmpmibs.a, libnetsnmpagent.a, libnetsnmphelpers.a and later when I try to find the memory map of the unitialized data structures, I found few bunch of information. The three main offenders according to me are: disks = 0x19190 (102k) bytes defined in mibgroups\ucd-snmp\disk.c. It's an array of size MAXDISKS which is defined in ...\net-snmp-5.1.1\include\net-snmp\net-snmp-config.h tclist = 0x18000 (98k) bytes defined in net-snmp-5.1.1\snmplibs\parse.c. It's an array of size MAXTC [4096] which is defined in the same file. fileTable = 0x140A0 (82k) bytes defined in agent\mibgroup\ucd-snmp\file.c. It's an array of size MAXFILE [20] which is defined in the same file. What is the significance of allocating such huge memory to these variables? Is there a way that by minimizing the "numbers" in #defines for these macros, we can reduce the size of a statically linked executable??? Would there be a impact which is not quite evident at this stage if the above values are changed? Regards, Sri. ************************************************************************ ************************************************************************ ************************************************************************ ***** This e-mail, and any attachments thereto, are intended only for use by the addressee(s) named herein and may contain privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is illegal and strictly prohibited. If you have received this e-mail in error, please immediately notify me by telephone and permanently delete the original and any copy of any e-mail and any printout thereof. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users