Mark Wonsil wrote:
> Just need a sounding board:
>
> I wrote an awk script to reformat a 3KB file. I developed the script on XP
> and moved it to HP-UX 10.2 It runs just fine in Windows XP but on HP-UX I
> get:
>
> Memory fault(coredump)
>
> A Google searched turns up:
>
> ftp://europe-ffs.external.hp.com/hp-ux_patches/s700_800/10.X/PHCO_20721.txt
> ...
> PHCO_18515:
> 1. awk produces memory leak if number of elements in array
> is large. The process grows until maxdsize is reached
> and awk coredumps.
> Resolution:
> The awk program uses regcomp(3C) to compile regular
> expression. The memory was allocated for a parameter
> to regcomp(3C). The awk program was assuming that this
> memory is freed by regfree(3C). Because of this incorrect
> assumption, memory leak was happening. A call to free
> function has been introduced to take care of this.
> ...
>
> Does this look like the culprit or might there be another based on other's
> experience? I'm not adding that much to any arrays. The default maxdsize
> is something like 65MB and I'm nowhere near that in my 3KB file.
Mark, that's probably it. I would just bump maxdsiz up myself - it's
WAY too low by default. I've set it to 1-2GB with no ill effects.
- Greg
--
Greg Cagle
gregc at gregcagle dot com
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *