home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!infonode!ingr!b11!billj
- From: billj@b11.b11.ingr.com (Bill Jones)
- Subject: Re: malloc in Think C
- Message-ID: <1992Sep1.002643.7531@b11.b11.ingr.com>
- Organization: Intergraph Corp. Huntsville, AL
- References: <25873@dog.ee.lbl.gov>
- Distribution: na
- Date: Tue, 1 Sep 1992 00:26:43 GMT
- Lines: 16
-
- sichase@csa1.lbl.gov (SCOTT I CHASE) writes:
-
- >char *array;
- >array = malloc(10000*sizeof(char));
-
- >My question is: Do I have to worry about memory moving around? Will
- >array continue to point to the correct data regardless of what toolbox
- >routines I use which scramble memory? Do I have to do this with a handle
- >instead or does Think's implementation of malloc lock the memory for me?
-
- malloc makes a NewPtr() call, which gets you non-relocatable memory. It
- don't move around.
-
- Bill Jones
- billj@beowulf.b11.ingr.com
-
-