Date: Sun, 8 Aug 1999 14:35:03 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Józsa Péter cc: DJGPP mailing list Subject: Re: Code and data locking In-Reply-To: <001901bedf95$7533c200$f36026c2@default> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id HAA18570 Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 6 Aug 1999, Józsa Péter wrote: > int _crt0_startup_flags = _CRT0_FLAG_NONMOVE_SBRK | _CRT0_FLAG_LOCK_MEMORY; > > int main(void) > { > _crt0_startup_flags &= ~_CRT0_LOCK_MEMORY; This might work, but to be sure, you will have to look through the library functions called by your interrupt handlers and make sure none of them allocates memory. Otherwise, your handler will wind up using unlocked memory and will crash. Also note that the entire stack of your program will be locked in the above setup, because the stack is sbrk'ed (and locked) by the startup code.