www.delorie.com/archives/browse.cgi | search |
Date: | Sun, 8 Aug 1999 14:35:03 +0300 (IDT) |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
X-Sender: | eliz AT is |
To: | Józsa Péter <p_jozsa AT freemail DOT c3 DOT hu> |
cc: | DJGPP mailing list <djgpp AT delorie DOT com> |
Subject: | Re: Code and data locking |
In-Reply-To: | <001901bedf95$7533c200$f36026c2@default> |
Message-ID: | <Pine.SUN.3.91.990808143442.23423l-100000@is> |
MIME-Version: | 1.0 |
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 |
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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |