# Diff of /src/lisp/gencgc.c

revision 1.95 by cshapiro, Fri Apr 11 08:00:53 2008 UTC revision 1.95.2.1 by rtoy, Wed May 14 16:12:06 2008 UTC
# Line 1834  static int (*sizetab[256]) (lispobj * wh Line 1834  static int (*sizetab[256]) (lispobj * wh
1834  static struct weak_pointer *weak_pointers;  static struct weak_pointer *weak_pointers;
1835  static struct scavenger_hook *scavenger_hooks = (struct scavenger_hook *) NIL;  static struct scavenger_hook *scavenger_hooks = (struct scavenger_hook *) NIL;
1836
1837    /* Like (ceiling x y), but y is constrained to be a power of two */
1838  #define CEILING(x,y) (((x) + ((y) - 1)) & (~((y) - 1)))  #define CEILING(x,y) (((x) + ((y) - 1)) & (~((y) - 1)))
1839
1840
# Line 3562  size_string(lispobj * where) Line 3563  size_string(lispobj * where)
3563
3564      vector = (struct vector *) where;      vector = (struct vector *) where;
3565      length = fixnum_value(vector->length) + 1;      length = fixnum_value(vector->length) + 1;
3566    #ifndef UNICODE
3567  #ifdef __x86_64  #ifdef __x86_64
3568      nwords = CEILING(NWORDS(length, 8) + 2, 2);      nwords = CEILING(NWORDS(length, 8) + 2, 2);
3569  #else  #else
3570      nwords = CEILING(NWORDS(length, 4) + 2, 2);      nwords = CEILING(NWORDS(length, 4) + 2, 2);
3571  #endif  #endif
3572    #else
3573        /*
3574         * Strings are just like arrays with 16-bit elements, and contain
3575         * one more element than the slot length indicates.
3576         */
3577        nwords = CEILING(NWORDS(length, 2) + 2, 2);
3578    #endif
3579      return nwords;      return nwords;
3580  }  }
3581

Legend:
 Removed from v.1.95 changed lines Added in v.1.95.2.1