Xref: utzoo comp.sys.mac.programmer:4488 comp.lang.c:16245 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!decwrl!decvax!ima!cfisun!lakart!fgz From: fgz@lakart.UUCP (Federico Genoese-Zerbi) Newsgroups: comp.sys.mac.programmer,comp.lang.c Subject: Re: Mac LightSpeed C question (elementary) Message-ID: <423@lakart.UUCP> Date: 13 Feb 89 15:49:44 GMT References: <1158@naucse.UUCP> Organization: Lakart Corporation, Newton, MA Lines: 29 From article <1158@naucse.UUCP>, by rrw@naucse.UUCP (Robert Wier): > There appears to be a 32k limit on data structures. Not too suprising > considering the limits of the 68k index register structure. I have > gotten around this problem in Pascal programs by doing allocate and > dispose operations. Is there something equivalent in C? There is. However, try the following: ptr = (variable type *)NewPtr(size needed); the C allocators used in Lightspeed end up calling NewPtr anyway. To deallocate try: DisposPtr(ptr); > Or is there > a more elegant technique (for example, on researcher here would like > to have a 512 * 512 array). > > Not being a C programmer, I would appreciate an answer in words of > one syallable :-). Look in the addendum to Lightspeed C 2.14 for a more detailed example or if you have THINK C 3.0, they have examples right in the manual. > > Thanks! No Prob. Federico {xait, mirror, cfisun}!lakart!fgz