delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/13/11:08:03

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10108131504.AA14030@clio.rice.edu>
Subject: Re: Latest crt0 patches (+block sizing for core)
To: eliz AT is DOT elta DOT co DOT il
Date: Mon, 13 Aug 2001 10:04:10 -0500 (CDT)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <1438-Mon13Aug2001122207+0300-eliz@is.elta.co.il> from "Eli Zaretskii" at Aug 13, 2001 12:22:07 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
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

> I have only minor comments.  Otherwise, I think this can go in.

I also added updated copyrights (missed that before diffs).

> > + 	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?

The comment for jns should be fixed to say /* If no sign block OK */
The comment for jnz should be added to say /* If wrap not allowed ignore block
With those clarifications - we only lock memory we keep.  I moved this
call later (after label 15) so we would not lock memory we didn't use.

Good feedback, I'll fix the comments.  (For anyone insane enough to 
look at crt0.S ...)


> > *** crt0.txh_203	Sat Mar 20 16:15:24 1999
> > --- crt0.txh	Sat Aug 11 21:43:06 2001
> > ***************
> > *** 100,104 ****
> >   #include <crt0.h>
> >   
> > ! extern __djgpp_sbrk_handle __djgpp_memory_handle_list[256];
> >   @end example
> >   
> > --- 100,111 ----
> >   #include <crt0.h>
> >   
> > !   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.

Isn't this an example section?  I thought I was fixing a declaration to
be a real example ... I'm not good at this yet.

> 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 `}'.

Okay, I didn't actually generate it and look at it.  I will do so before
commit.  Bad developer.  Must do QA duty.

> > + 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.

Agreed, much more clear.

- Raw text -


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