Xref: news2.mv.net comp.os.msdos.djgpp:5745 From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams) Newsgroups: comp.os.msdos.djgpp Subject: Locking RAM for hardware interrupts Date: Mon, 08 Jul 1996 20:48:40 GMT Lines: 36 Message-ID: <836858848.164.0@abwillms.demon.co.uk> NNTP-Posting-Host: abwillms.demon.co.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Well, I've seen three approaches to this problem: A) Pray. Leave pages unlocked and hope they don't get swapped out B) Masochism. Write the interrupt in assembler and all that, as scribed in the FAQ C) Allegro's function-pointer-marker thing, which seems a good idea, but can we guarantee the ordering of functions to be correct? Locking variables isn't a problem; their location can be exactly specified. But function locking is still a chore (even if we do it the Allegro way). My proposal is: make a crt0 flag that locks the /program image/ rather than /all memory/. It should be real easy to know where the image starts and ends! Lock the lot, and leave the programmer responsible for locking dynamically allocated blocks (which are usually the candidates for paging, since they can be huge bitmaps etc. unlikely to be declared as static data). That way, all functions are locked, and thus safe... Is this practical??? Regards, ABW -- I have become... Comfortably numb... Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk http://www.hardcafe.co.uk/Alaric/