BUG in free() on sunOS 4.0.x

Mehdi Bonyadi mehdi at babel.SanDiego.NCR.COM
Fri Sep 29 07:29:28 AEST 1989


I wrote a program that creates a  directed  graph  and  traverses
this  graph to find the minimum and maximum cost paths.  Any time
a traversal ends a report of  the  edges  and  nodes  is  created
dynamically.   I  am  saving the top 100 ( user picks this number
and there is no limit on it) of these reports.  The problem I  am
facing  is with memory usage.  Once a report is put into the list
and later needs to be replaced, I  use  the  function
"free"  to  free the memory.  Well, it appears that free does not
work and the memory is not freed. The reason being process memory
usage  goes above the limits and process dies.  ( my database  is
quite large and I have to deal with it in one run and I  can  not
break it down to smaller pieces so that I do not reach the limit.
) I am running this program on sun4 and  sun3  workstations.   An
engineer from sun hot line told me about an existing problem with
"free", he said it does not work in sunOS 4.0 and above ( he  was
not sure about previous releases of the OS ). I have a dealine to
meet and I have been working on this program for  over  one  year
and  (  it appears that ) none of my tests caught this problem. I
guess I was counting on C in giving me the opportunity to use and
release  memory  and I did not design a test case to make sure of
that.  If there is anybody  who  knows  how  to  deal  with  this
problem  please  let  me  know.   If there is a work around or if
there is another way of programming this thing, I am  willing  to
do  it.   If  someone  has  a  memory management package that can
allocate a big chunk and then work with its own malloc  and  free
please  let  me  know.  I have time till Monday October second to
solve this problem or ???????



More information about the Comp.unix.questions mailing list