<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, John --&nbsp;<div>The 'galloc' function was set up by Brian as a way to track memory overlays. &nbsp;It is basically re-implementation of malloc that adds 8 bytes to the end of each chunk of allocated memory and puts "AAAAAAAA" into those bytes. Then when that memory is freed (via the gree function, also part of galloc.c), then it checks to make sure those 8 A's are still there. If not, then (if compiled in verbose mode) it issues a warning message that the memory has been overlaid. At any point when running GrADS interactively, you can use 'q mem' to show you the list of memory chunks that have been allocated with galloc. During the development of v2, the use of galloc and gree instead of malloc and free have been helpful for tracking memory usage and plugging leaks. Not every call to malloc in the GrADS source code has been replaced by galloc (especially in the graphics side). At some point, we will likely remove the calls to galloc and just use malloc instead, but for now it is still a useful debugging tool.</div><div><br><div><div>On Apr 7, 2010, at 6:32 PM, Huddleston, John wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello,<br><br>Most users open up GrADS and do their work and exit wihtout a serious hit to memory losses.<br><br>However, my situation is unique in that I am running GrADS to create thousands of satellite images; so, memory losses are steep.&nbsp;<br></div></blockquote>You might try looking at the 'q mem' output after the 1st, 10th, 100th plot and it might reveal where the accumulating memory is getting allocated. Each instance of galloc has a name, which shows up in the 'q mem' output. Also, you might try putting in a strategic 'reinit' now and then in your script -- this should release all memory (with a few small exceptions) and if you do a 'q mem' after a 'reinit' and it is still showing lots of allocated blocks then something is wrong.&nbsp;</div><div><br></div><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>The losses are compounded within functions and eliminating those losses with the free memory function causes GrADS to lose its mind.<br></div></blockquote>Which functions are you calling? Recently a leak in lterp() was patched (after the release of 2.0.a8).&nbsp;If it is practical, can you give me a script that will demonstrate GrADS losing its mind? I'd like to see what that looks like, and also prevent it from happening. Perhaps drawing the same plot over and over again from a single file?&nbsp;</div><div><br></div><div>--Jennifer</div><div><br><blockquote type="cite"><div><br>There are three calls in GrADS: galloc, malloc, and calloc. The GrADS galloc call is the return call similar to malloc and calloc.<br><br>The function galloc can be reinvented as a void call with all arguments passed to it. New memory would be realloc.<br><br>I would devote my time to reengineer GrADS with the designers if they are willing.<br><br>John<br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></body></html>