Date: Wed, 5 Mar 1997 10:38:58 +0200 (IST) From: Eli Zaretskii To: Scott Fleischman cc: djgpp AT delorie DOT com Subject: Re: __djgpp_base_address In-Reply-To: <199703041954.NAA143876@audumla.students.wisc.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 4 Mar 1997, Scott Fleischman wrote: > Thank you for your reply but I diagree with never using __djgpp_base_address, > and in this case it is the right thing to use. Well, in your case, I fail to understand what on earth are you trying to achieve, so I can't judge whether you indeed need `__djgpp_base_address'. If you need to lock the memory of the entire program, then that's NOT how it should be done. The correct way is just to set the `_CRT0_FLAG_LOCK_MEMORY' bit in the `_crt0_startup_flags' variable, as the FAQ explains (section 18.9). The way you did it, you only lock static data and code, but not the memory allocated by the calls to `malloc' and friends, and neither the stack. `__djgpp_conventional_base' and the nearptr feature are for fast access to memory-mapped devices and absolute addresses, they are not the proper tools for locking memory, AFAIK. > If I use __djgpp_conventional_base it doesn't work. The fact that it doesn't work isn't in itself a proof that it isn't the right thing to do; the rest of your code might be the reason for that.