Path: utzoo!attcan!uunet!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: C function ptrs & Mac mem segments Message-ID: <2757@husc6.harvard.edu> Date: 2 May 90 04:05:57 GMT References: <3550@dogie.macc.wisc.edu> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Organization: Symantec Language Products Group Lines: 30 In article <3550@dogie.macc.wisc.edu> yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) writes: > >The init code, all of the C functions themselves and the routine >that actually does the referencing (jumping) to the functions >are all in one segment, but not the main one, (it's too big - >not enuf room left in the main segment to squeeze it in.) > >Do I ever have to worry about the Mac memory manager purging and >then reloading this segment thereby possibly causing the address's >to become invalid? Should I just assume that if I'm in the >segment I should lock it somehow, or make it non-purgeable? >Or perhaps just simply re-init the addresses every time I go >into the segment? Not a problem. When you take the address of a function in THINK C, what you get is the address of its jumptable entry, which, when jumped to, will cause the segment to be loaded if it is unloaded, and in either case you'll end up at your routine. R. ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel "Don't try to understand 'em, just rope, throw, and brand 'em." ~~~~~~~~~~~~~~~