Mail Archives: djgpp-workers/2001/08/13/05:23:38
> 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 <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.
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 <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
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.
- Raw text -