Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!rutgers!cbmvax!cbmehq!babylon!rbabel From: rbabel@babylon.rmt.sub.org (Ralph Babel) Newsgroups: comp.sys.amiga.programmer Subject: Re: Starting another copy of your own code (was Re: Help! (AmigaDOS CreateProc/LoadSeg) Message-ID: <06577.AA06577@babylon.rmt.sub.org> Date: 12 Mar 91 19:10:26 GMT References: <63329@eerie.acsu.Buffalo.EDU> <19578@cbmvax.commodore.com> <06417.AA06417@babylon.rmt.sub.org> <18cb4d63.ARN0b56@swinjm.UUCP> <1991Mar9.170859.4810@Sandelman.OCUnix.On.Ca> <06493.AA06493@babylon.rmt.sub.org> <752@tnc.UUCP> Reply-To: cbmvax.commodore.com!cbmehq!babylon!rbabel (Ralph Babel) Lines: 20 In article <752@tnc.UUCP>, m0154@tnc.UUCP (GUY GARNETT) writes: > In the example code from AmigaMail, the 'code' is a single > instruction which is built into a data structure. When it > is branched to, the code cache will miss (that location > has never been executed before; How do you know? The same memory region might have been part of a code hunk - and FreeMem() doesn't clear the code cache. > The method is also always safe if you invalidate the cache > right after you put a value in CodeHdr.Function; With the 2.0 cache support functions it's certainly a lot safer (and easier) than before, but just wait and see how many programs will fail nevertheless with the 68040's copyback cache enabled. Ralph