www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/07/06:58:28

Message-ID: <001901bedf95$7533c200$f36026c2@default>
From: "Józsa Péter" <p_jozsa AT freemail DOT c3 DOT hu>
To: "DJGPP mailing list" <djgpp AT delorie DOT com>
Subject: Code and data locking
Date: Fri, 6 Aug 1999 00:54:20 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

Hello!
I'm relatively new to DJGPP, so forgive me if my question seems stupid. I
have a program in which I use some hardware interrupt handlers, and I don't
want to lock them individually for several reasons (e.g. they use way too
many variables). So I've decided to lock my program's code and data segments
entirely (the image size is not so large) but I don't want to lock any
additionally allocated memory. As I figure, the way to do it is something
like this:

#include <crt0.h>

int _crt0_startup_flags = _CRT0_FLAG_NONMOVE_SBRK | _CRT0_FLAG_LOCK_MEMORY;

int main(void)
{
    _crt0_startup_flags &= ~_CRT0_LOCK_MEMORY;
...

Am I right? If not, please someone tell me how I could do what I described
above.
Thank you.

(Please send answers to: p_jozsa AT freemail DOT c3 DOT hu)


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019