New volatility rules for optimiser

$XDATA and volatility

Merlin
Administrator
Avatar
Geschlecht:
Alter: 25
Beiträge: 1474
Dabei seit: 03 / 2005
Betreff:

New volatility rules for optimiser

 · 
Gepostet: 01.08.2011 - 11:02 Uhr  ·  #1
With the latest (just released) version of the optimiser volatility rules have changed for $XDATA.

Previously XDATA was considered non-volatile, but this caused a problem with memory mapped peripherals. Consequently XDATA is now assumed to be volatile, which is the safest option.

No existing programs should stop working as a consequence of this, but the optimisation might be poorer. To get around this some new flags have been introduced. They apply to all memory areas, not just XDATA.

To return to your previous optimising actions put the following switches around your XDATA areas:

Code
{$XDATA}
{$OPTI VOLATILE_OFF}
... // your data
{$OPTI VOLATILE_DFT}


This will return the xdata area to be treated as non-volatile.

Currently there are a few typos in the manual, but these will be corrected shortly. The three new switches are

{OPTI VOLATILE_ON}
Treat following variables as volatile.

{$OPTI VOLATILE_OFF}
Treat following variables as non-volatile

{$OPTI VOLOATILE_DFT}
Return to default methods.

ALWAYS terminate with a {$OPTI VOLATILE_DFT} directive.

Merlin.
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 15 · Cache Hits: 13   36   49 · Page-Gen-Time: 0.037959s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI