basic-prot

basic-prot


basic Index Level basic-prot-off
Syntax basic-prot {(option}
Category TCL
Type Verb
Description toggles or displays the status of the FlashBASIC object protection scheme.
When enabled, this feature is global, thus it affects the entire system.

D3 shares FlashBASIC object code between all processes running a given program. While this vastly decreases memory requirements, it also opens the possibility of one user compiling a program while another user is concurrently running that same routine. This circumstance tends to produce random, unexplainable aborts that can be difficult to track on large systems. The protection scheme involves insulating running object code from updates caused by recompilation.

On D3 7.0, when protection is enabled, all previous revisions of FlashBASIC object code are kept in the same dictionary group, but are simply marked as "deleted". These "deleted" items are automatically cleared during the "save" process. (See the discussion of "dirty bits" in the topic on the "save" verb.) This allows compiling programs while they are currently being executed. Users running a given program when that program is compiled will continue to run the old version. If a user drops out of the program, to TCL, for example, and re-executes the program, the system will execute the newest object version.

On D3 7.1 and above, old BASIC object code is moved to the dm,object.queue, file where it is eventually deleted.  By default, object code remains in this file until 1000 subsequent compiles (of any program) are performed.  To increase this number, do BASIC-PROT ## where ## is the new queue size.  To make the number infinite (or virtually infinite), use 0.
Options f  Toggles object protection off.

n  Toggles object protection on.

number  Sets the queue size on 7.1 and above.
See Also basic-prot-on basic-prot-off user-coldstart save
Example
Warnings Enabling the object protection scheme may require significant amounts of temporary overflow, as space is required for every single update. This overflow space is returned after a full save.

The object protection mechanism is disabled during the save because it must remove old revisions.

The object protection scheme is cleared when Pick is booted. To enable it each time the system is rebooted, place the "basic-prot-on" command in the "user-coldstart" macro.

This command does not apply to FlashBASIC object code which is implicitly shared among all users and automatically protected against recompilation of a program executed by other processes.
Compatibility AP 5.2.5 AP 6.0
basic Index Level basic-prot-off