Mac LightSpeed C question (elementary)
Federico Genoese-Zerbi
fgz at lakart.UUCP
Tue Feb 14 01:49:44 AEST 1989
>From article <1158 at naucse.UUCP>, by rrw at 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
More information about the Comp.lang.c
mailing list