Re: Port of vi to VSTa

From: Andrew Valencia <vandys_at_nospam.org>
Date: Fri Jun 03 1994 - 13:51:34 PDT

Hi,

        I have the digest format of the VSTa mailing list working now.
This will generate AT MOST one digest per day, and will wait up to three
days to gather at least three messages. If you'd prefer this format, please
send a note to vsta-request@cisco.com, and I'll switch you over. Now...

[Chris Patti <chrisp@icad.com> writes:]

>Out of curiosity, when you and other folks are compiling these large apps
> don't you run across that stack growth problem that keeps biting me ien the
>nose whenever I try to build anything under VSTa?

(Andy lurches into motion, one rcsdiff later:)

*** c:/tmp/T0AA.AAA Fri Jun 03 13:40:42 1994
--- os/mach/trap.c Sat May 21 11:29:18 1994
***************
*** 98,109 ****
--- 98,110 ----
   * once it has figured out the faulting address and such.
   */
  static void
  page_fault(struct trapframe *f)
  {
          ulong l;
+ struct vas *vas;
          extern ulong get_cr2();
  
          ASSERT(curthread, "page_fault: no proc");
  
          /*
           * Get fault address. Drop the high bit because the
***************
*** 125,146 ****
          dbg_fault_addr = l;
  #endif
  
          /*
           * Let the portable code try to resolve it
           */
! if (vas_fault(curthread->t_proc->p_vas, l,
! f->errcode & EC_WRITE)) {
                  if (curthread->t_probe) {
  #ifdef DEBUG
                          printf("cpfail\n"); dbg_enter();
  #endif
                          ASSERT((f->ecs & 3) == PRIV_KERN,
                                  "page_fault: probe from user");
                          f->eip = (ulong)(curthread->t_probe);
                  } else {
                          selfsig(EFAULT);
                  }
          }
  }
  
  /*
--- 126,162 ----
          dbg_fault_addr = l;
  #endif
  
          /*
           * Let the portable code try to resolve it
           */
! vas = curthread->t_proc->p_vas;
! if (vas_fault(vas, l, f->errcode & EC_WRITE)) {
                  if (curthread->t_probe) {
  #ifdef DEBUG
                          printf("cpfail\n"); dbg_enter();
  #endif
                          ASSERT((f->ecs & 3) == PRIV_KERN,
                                  "page_fault: probe from user");
                          f->eip = (ulong)(curthread->t_probe);
                  } else {
+ /*
+ * Stack growth. We try to grow it if it's
+ * a "reasonable" depth below current stack.
+ */
+ if ((l < USTACKADDR) &&
+ (l > (USTACKADDR-UMINSTACK))) {
+ if (alloc_zfod_vaddr(vas, btop(UMAXSTACK),
+ USTACKADDR-UMAXSTACK)) {
+ return;
+ }
+ }
+
+ /*
+ * Shoot him
+ */
                          selfsig(EFAULT);
                  }
          }
  }
  
  /*
Received on Fri Jun 3 12:59:25 1994

This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 21:04:28 PDT