Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!sun-barr!rutgers!noao!dat From: dat@noao.edu (D'Anne Thompson) Newsgroups: comp.realtime Subject: Re: vxWorks memory partitions Message-ID: <1085@noao.UUCP> Date: 12 May 89 17:02:13 GMT References: <3213@ncar.ucar.edu> Organization: National Optical Astronomy Observatories, Tucson, AZ Lines: 38 From article <3213@ncar.ucar.edu>, by cmiller@hao.ucar.edu (Charlie Miller): > > ........................ The only way I have found to get around this is > to manually do free(program_name) from the shell or to reset. There must be > a way to automate this process. > > Any suggestions?? > I have already sent such a request directly to Wind River Systems. Unfortunately, using 'free' in such a cavalier manner is not good practice. 'Free' should never be used with any argument that is not the result of a previous 'malloc'. In some implementations it may work and in others it may not work. It may appear to work but cause problems down the road. The proper way to unload a module is to undo each 'malloc' in the reverse order. Then there is the problem of symbol table entries which point into the 'free'd space. Assuming you are going to just reload a corrected module each symbol table entry will be redefined and there is no problem. But if not, then you are in danger of having symbols point into unknown memory spaces. To correct the symbol table you either have to purge those symbols or at least redirect them to 0x0, or non-existant memory, to nullify them somehow. We are very happy users of vxWorks (4.0.1). An internal memo of our experiences with vxWorks is available upon request. The memo includes bugs and bug fixes, suggestions for improvements in vxWorks, and a description of library packages that are available for outside distribution. I will not put the memo on the net. It is available for direct mailing only. D'Anne Thompson National Optical Astronomy Observatories P.O. Box 26732 Tucson, Az 85726 (602) 325-9335 dat@noao.edu (for uucp try {..}!uunet!noao.edu!dat)