Article View: comp.sys.amiga.tech
Article #4317Re: Whats wrong with self Modifying Code?
From: Randell Jesup
Date: Wed, 11 Jul 1990 21:00
Date: Wed, 11 Jul 1990 21:00
26 lines
2110 bytes
2110 bytes
In article <MWM.90Jul11114553@raven.pa.dec.com> mwm@raven.pa.dec.com (Mike (Real Amigas have keyboard garages) Meyer) writes:
>In article <1990Jul10.201202.3378@sunee.waterloo.edu> gpsteffl@sunee.waterloo.edu (Glenn Patrick Steffler) writes:
> Fine, thats what I would do if it were not for the problems that may happen
> on machines which cache lots of memory. If I recompile into the array
> and run code from it withouta a cache flush, the possibility of major
> problems is quite large.
>
>The last two sentences in the paragraph cover that. You don't just
>branch into the code, you run it as a seperate task (or thread or
>whatever your favorite term is). If the OS fails to correctly deal
>with caches in this case, then it's got a _serious_ bug. After all you
>haven't done anything different from what happens when a shell starts
>an application.
>
>The OS may do a cache flush. Then again, it may not - it has more
>information about what's going on in the system than you do.
The OS does a cache flush when it needs to - when it does relocation
in LoadSeg(), it flushes the caches afterwards before returning. There's
no reason for the Shell to do cache flushes - they're only needed after
creating or modifying executable code.
--
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup
Common phrase heard at Amiga Devcon '89: "It's in there!"
Technical Details
Message-ID:
<13153@cbmvax.commodore.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!rutgers!cbmvax!jesupReferences:
<1990Jul6.201328.24660@csmil.umich.edu> <1990Jul6.201743.24777@csmil.umich.edu> <138523@sun.Eng.Sun.COM> <1990Jul9.163607.18336@sunee.waterloo.edu> <MWM.90Jul9134559@raven.pa.dec.com> <1990Jul10.201202.3378@sunee.waterloo.edu> <MWM.90Jul11114553@raven.pa.Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!rutgers!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: Whats wrong with self Modifying Code? Message-ID: <13153@cbmvax.commodore.com> Date: 11 Jul 90 21:00:31 GMT References: <1990Jul6.201328.24660@csmil.umich.edu> <1990Jul6.201743.24777@csmil.umich.edu> <138523@sun.Eng.Sun.COM> <1990Jul9.163607.18336@sunee.waterloo.edu> <MWM.90Jul9134559@raven.pa.dec.com> <1990Jul10.201202.3378@sunee.waterloo.edu> <MWM.90Jul11114553@raven.pa. Reply-To: jesup@cbmvax (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 26