Path: utzoo!attcan!uunet!ginosko!xanth!ames!uhccux!munnari.oz.au!murtoa.cs.mu.oz.au!jkjl From: jkjl@cs.mu.oz.au (John Keong-Jin Lim) Newsgroups: comp.sys.mac.programmer Subject: Re: malloc in LSC Message-ID: <2806@murtoa.cs.mu.oz.au> Date: 19 Jul 89 07:29:07 GMT References: <73300002@m.cs.uiuc.edu> Reply-To: jkjl@murtoa.UUCP (John Keong-Jin Lim) Organization: Comp Sci, Melbourne Uni, Australia Lines: 15 In article <73300002@m.cs.uiuc.edu> rudolph@m.cs.uiuc.edu writes: > >Are there any known problems with malloc, calloc, etc in LSC? I have a >program that is basically Unix-style - the only Mac-type stuff is a call >to SFGetFile. When I call malloc(), I get strange results. If I You gotta #include "storage.h". What is happening is that all functions return an int by default. So you are getting the high bits of your address only. Thus you get low memory addresses when using malloc (Talk about 32-bit clean !). john ps : #include "proto.h" might be even a better idea !