Print this page
os/grow: define 'p' under the same ifdef as it's consumed

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/grow.c
          +++ new/usr/src/uts/common/os/grow.c
↓ open down ↓ 491 lines elided ↑ open up ↑
 492  492  /*
 493  493   * Find address for user to map.
 494  494   * If MAP_FIXED is not specified, we can pick any address we want, but we will
 495  495   * first try the value in *addrp if it is non-NULL.  Thus this is implementing
 496  496   * a way to try and get a preferred address.
 497  497   */
 498  498  int
 499  499  choose_addr(struct as *as, caddr_t *addrp, size_t len, offset_t off,
 500  500      int vacalign, uint_t flags)
 501  501  {
      502 +#if defined(__amd64)
 502  503          proc_t *p = curproc;
      504 +#endif
 503  505          caddr_t basep = (caddr_t)(uintptr_t)((uintptr_t)*addrp & PAGEMASK);
 504  506          size_t lenp;
 505  507  
 506  508          ASSERT(AS_ISCLAIMGAP(as));      /* searches should be serialized */
 507  509  
 508  510          /*
 509  511           * If we have been provided a hint, we should still expand the lenp
 510  512           * to be the rest of the address space.  This will allow us to
 511  513           * treat the hint as a strong desire to be "nearby" the provided
 512  514           * address.  If we can't satisfy the hint, as_gap() will walk forward.
↓ open down ↓ 529 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX