Date: Mon, 13 Aug 2001 12:22:07 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <1438-Mon13Aug2001122207+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <10108121754.AA12952@clio.rice.edu> (sandmann@clio.rice.edu) Subject: Re: Latest crt0 patches (+block sizing for core) References: <10108121754 DOT AA12952 AT clio DOT rice DOT edu> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) > Date: Sun, 12 Aug 2001 12:54:59 -0500 (CDT) > > Here are the latest crt0 diffs. Thanks! > They include memory handle sizing for dumps, > fixes for address space wraps, and fixes for too many memory handles. > Documentation updates included. 4 patched files. If there are no new > comments I'd like to get these into cvs. I have only minor comments. Otherwise, I think this can go in. > + cmpl ___djgpp_base_address, %ecx /* New dpmi size */ > + jns 15f /* Ignore this block */ > + testb $0x80, __crt0_startup_flags+1 /* include/crt0.h */ > + jnz 14b > + 15: > + pushl %edx /* Size */ > + call lock_memory > + Do I understand correctly that you lock each block that you discard as being below the base address? If so, does this locking have some downsides we should be aware of? > *** crt0.txh_203 Sat Mar 20 16:15:24 1999 > --- crt0.txh Sat Aug 11 21:43:06 2001 > *************** > *** 100,104 **** > #include > > ! extern __djgpp_sbrk_handle __djgpp_memory_handle_list[256]; > @end example > > --- 100,111 ---- > #include > > ! for(i=0; i<256; i++) { > ! int h, a, s; > ! h = __djgpp_memory_handle_list[i].handle; > ! a = __djgpp_memory_handle_list[i].address; > ! s = __djgpp_memory_handle_size[i]; > ! if(a == 0 && i != 0) break; > ! printf("handle[%d]=0x%x base=0x%x size=0x%x\n",i,h,a,s); > ! } > @end example This is an example of usage, not of declaration. Examples of usage should go into the "Example" section, not into the "Syntax" section. Also, you cannot use an unadorned `{' in Texinfo; you need to escape it with `@', like this: for(i=0; i<256; i++) @{ and similarly for `}'. > + @node __djgpp_memory_handle_size, memory > + @subheading Syntax > + > + @example > + #include > + > + for(i=0; i<256; i++) { > + int h, a, s; > + h = __djgpp_memory_handle_list[i].handle; > + a = __djgpp_memory_handle_list[i].address; > + s = __djgpp_memory_handle_size[i]; > + if(a == 0 && i != 0) break; > + printf("handle[%d]=0x%x base=0x%x size=0x%x\n",i,h,a,s); > + } > + @end example Same here. > + This array contains a list of the sizes of the memory handles allocated > + by sbrk() in addition to the handle allocated by the stub. I think "the sizes of the memory regions" is better: a handle has no size.