Lines Matching refs:nbytes

748 #  define POW2_OPTIMIZE_ADJUST(nbytes)				\
749 ((nbytes >= FIRST_BIG_BOUND) ? nbytes -= PERL_PAGESIZE : 0)
754 # define POW2_OPTIMIZE_ADJUST(nbytes)
758 #define BARK_64K_LIMIT(what,nbytes,size)
1100 fill_pat_4bytes(unsigned char *s, size_t nbytes, const unsigned char *fill)
1102 unsigned char *e = s + nbytes;
1141 cmp_pat_4bytes(unsigned char *s, size_t nbytes, const unsigned char *fill)
1143 unsigned char *e = s + nbytes;
1178 size_t nbytes;
1182 nbytes = *nbytes_p;
1192 if (nbytes == 0)
1194 else if (nbytes <= SIZE_TABLE_MAX) {
1195 bucket = bucket_of[(nbytes - 1) >> BUCKET_TABLE_SHIFT];
1198 if (nbytes == 0)
1199 nbytes = 1;
1200 if (nbytes <= MAX_POW2_ALGO) goto do_shifts;
1205 POW2_OPTIMIZE_ADJUST(nbytes);
1206 nbytes += M_OVERHEAD;
1207 nbytes = (nbytes + 3) &~ 3;
1211 shiftr = (nbytes - 1) >> START_SHIFT;
1217 *nbytes_p = nbytes;
1230 Perl_malloc(size_t nbytes)
1235 MEM_SIZE size = nbytes;
1243 if (nbytes > PTRDIFF_MAX) {
1251 BARK_64K_LIMIT("Allocation",nbytes,nbytes);
1253 if ((long)nbytes < 0)
1257 bucket = adjust_size_and_find_bucket(&nbytes);
1276 size_t n = nbytes;
1350 nbytes = size + M_OVERHEAD;
1351 p->ov_size = nbytes - 1;
1352 if ((i = nbytes & (RMAGIC_SZ-1))) {
1354 while (i--) /* nbytes - RMAGIC_SZ is end of alloced area */
1355 ((caddr_t)p + nbytes - RMAGIC_SZ)[i] = RMAGIC_C;
1358 nbytes = (nbytes + RMAGIC_SZ - 1) & ~(RMAGIC_SZ - 1);
1359 ((u_int *)((caddr_t)p + nbytes))[-1] = RMAGIC;
1863 MEM_SIZE nbytes = ovp->ov_size + 1;
1865 if ((i = nbytes & (RMAGIC_SZ-1))) {
1867 while (i--) { /* nbytes - RMAGIC_SZ is end of alloced area */
1868 ASSERT(((caddr_t)ovp + nbytes - RMAGIC_SZ)[i] == RMAGIC_C,
1873 nbytes = (nbytes + (RMAGIC_SZ-1)) & ~(RMAGIC_SZ-1);
1874 ASSERT(((u_int *)((caddr_t)ovp + nbytes))[-1] == RMAGIC,
1876 FILLCHECK_DEADBEEF((unsigned char*)((caddr_t)ovp + nbytes),
1877 BUCKET_SIZE(OV_INDEX(ovp)) - nbytes);
1906 Perl_realloc(void *mp, size_t nbytes)
1918 MEM_SIZE size = nbytes;
1920 if ((long)nbytes < 0)
1924 BARK_64K_LIMIT("Reallocation",nbytes,size);
1926 return Perl_malloc(nbytes);
1977 if (nbytes > onb) incr = 1;
1981 nbytes > ( (onb >> 1) - M_OVERHEAD )
1983 || (bucket == FIRST_BIG_POW2 && nbytes >= LAST_SMALL_BOUND )
1990 if (nbytes > BUCKET_SIZE_REAL(prev_bucket))
2020 if (nbytes > ovp->ov_size + 1 - M_OVERHEAD)
2022 nbytes - (ovp->ov_size + 1 - M_OVERHEAD));
2024 FILL_DEADBEEF((unsigned char*)cp + nbytes,
2025 nb - M_OVERHEAD + RMAGIC_SZ - nbytes);
2032 nbytes += M_OVERHEAD;
2033 ovp->ov_size = nbytes - 1;
2034 if ((i = nbytes & (RMAGIC_SZ-1))) {
2036 while (i--) /* nbytes - RMAGIC_SZ is end of alloced area */
2037 ((caddr_t)ovp + nbytes - RMAGIC_SZ)[i]
2041 nbytes = (nbytes + (RMAGIC_SZ-1)) & ~(RMAGIC_SZ - 1);
2042 ((u_int *)((caddr_t)ovp + nbytes))[-1] = RMAGIC;
2052 MEM_SIZE require, newarena = nbytes, pow;
2088 if ((res = (char*)Perl_malloc(nbytes)) == NULL)
2091 Copy(cp, res, (MEM_SIZE)(nbytes<onb?nbytes:onb), char);