aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-10 20:34:12 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-10 20:34:12 +0000
commitf08179716634726ac31184b9e21bd6585514cc88 (patch)
tree832a6e8c6b5d6647eb941dffeaed6390afc68a8f /Makefile
parentd11bbdf306ddf4002e5b0bafdf83deeed3c0a56b (diff)
Blocked revisions 129734 via svnmerge
........ r129734 | mmichelson | 2008-07-10 15:33:13 -0500 (Thu, 10 Jul 2008) | 23 lines Removed the fn2 field from the vm_state structure. fn2 was used in three functions. In every case, it was initialized in the function it was used in. This meant there was no need to have it in a malloc'd structure just taking up space. Furthermore two of the functions it was used in were completely unnecessary since fn2 was set to exactly the same value as the vm_state's fn string. fn2 was a char array sized at PATH_MAX. On my system, PATH_MAX is 4096. This equates to a 4K memory savings per vm_state allocated. Since there is a vm_state malloc'd for every voicemail user on the system, this could potentially add up nicely if there are lots of users. In addition, a vm_state is allocated on the stack each time a caller calls the VoiceMailMain application, meaning that there is a significant stack savings with this patch too. Of course, a single vm_state struct still takes up approximately 20K on my system (when using IMAP storage. Without IMAP storage, there would be about another 300 bytes fewer usage), even with this removal. Further optimizations are probably possible, but most likely not as easy as this one. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@129735 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions