Any problems with malloc on OS 4.1?

Dale Gallaher dale at jack.ci.com
Tue Mar 19 03:28:00 AEST 1991


For the past few week we have been trying to track down a problem in our
application which started when it was used on OS 4.1.  It is very
sensitive to the users environment.  Briefly what happens is that we get a
Segmentation Violation in malloc when it is called from putenv.  This only
happens sometimes and we don't have any problems elsewhere in what is a 9
Meg executable. 

I have replaced putenv with an older version and I still get the problem;
however, when I use an older version of malloc everything works fine.  I
have heard that malloc was basically rewritten for 4.1 but I don't know
this for sure.  Since I don't have sources for the new malloc I cannot
debug through it and I don't really want to debug through the assembler to
figure out what is going on. 

The application I am having the problem with does use sbrk to allocate
some of its own memory.  In discussions with some other people it has been
mentioned that this might cause problems with the new sun malloc. 

If anyone has had or knows of any problems with malloc please let me know;
otherwise, I will try to go through Sun Support for an answer. 

Dale Gallaher
dale at dandelion.ci.com
(508)667-7900 x121



More information about the Comp.sys.sun mailing list