Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!portal!cup.portal.com!jwhitnell From: jwhitnell@cup.portal.com (Jerry D Whitnell) Newsgroups: comp.sys.mac.programmer Subject: Re: Slow NewPtr on fx Message-ID: <33606@cup.portal.com> Date: 7 Sep 90 01:09:51 GMT References: <478@nih-csl.nih.gov> Organization: The Portal System (TM) Lines: 19 Wayne Rasband (wayne@helix.nih.gov) writes... |After putting in some debugging code, I discovered that the |NewPtr call used to allocate the 64K PixMap for each window was taking |about 1/4 second on the cx, and an incredible five seconds(!!!) on the fx. |Does someone know why NewPtr is up to 20 times slower on the fx? | |Wayne Rasband (wayne@helix.nih.gov) Remember, NewPtr allocates memory at the bottom of the heap, so it has to move everything above it up to make room. This means that if there is more stuff on the heap, it will take longer. Another possiblity may have to do with the FX being 32-bit clean. A technique I prefer for allocating large chunks of fixed memory is to call NewHandle, followed by a MoveHHi and an HLock. This puts the memory at the top of the heap where it is out of the way. You may find this faster. Jerry Whitnell SuperMac Technology