# define POW2_OPTIMIZE_SURPLUS(bucket) 0
#endif /* !TWO_POT_OPTIMIZE */
-#ifdef HAS_64K_LIMIT
-# define BARK_64K_LIMIT(what,nbytes,size) \
- if (nbytes > 0xffff) { \
- PerlIO_printf(PerlIO_stderr(), \
- "%s too large: %lx\n", what, size); \
- my_exit(1); \
- }
-#else /* !HAS_64K_LIMIT */
-# define BARK_64K_LIMIT(what,nbytes,size)
-#endif /* !HAS_64K_LIMIT */
+#define BARK_64K_LIMIT(what,nbytes,size)
#ifndef MIN_SBRK
# define MIN_SBRK 2048
# define SBRK_FAILURE_PRICE 50
#endif
-static void morecore (register int bucket);
+static void morecore (int bucket);
# if defined(DEBUGGING)
static void botch (const char *diag, const char *s, const char *file, int line);
# endif
# define FILLCHECK_DEADBEEF(s, n) ((void)0)
#endif
-int
-S_ajust_size_and_find_bucket(size_t *nbytes_p)
+STATIC int
+S_adjust_size_and_find_bucket(size_t *nbytes_p)
{
- MEM_SIZE shiftr;
+ MEM_SIZE shiftr;
int bucket;
- size_t nbytes = *nbytes_p;
+ size_t nbytes;
+
+ PERL_ARGS_ASSERT_ADJUST_SIZE_AND_FIND_BUCKET;
+
+ nbytes = *nbytes_p;
/*
* Convert amount of memory requested into
croak("%s", "panic: malloc");
#endif
- bucket = S_ajust_size_and_find_bucket(&nbytes);
+ bucket = adjust_size_and_find_bucket(&nbytes);
MALLOC_LOCK;
/*
* If nothing in hash bucket right now,
* Allocate more memory to the indicated bucket.
*/
static void
-morecore(register int bucket)
+morecore(int bucket)
{
dVAR;
union overhead *ovp;
}
}
if (t && *t) {
+ dTHX;
MYMALLOC_WRITE2STDERR("Unrecognized part of PERL_MALLOC_OPT: \"");
MYMALLOC_WRITE2STDERR(t);
MYMALLOC_WRITE2STDERR("\"\n");
}
Malloc_t
-Perl_calloc(register size_t elements, register size_t size)
+Perl_calloc(size_t elements, size_t size)
{
long sz = elements * size;
Malloc_t p = Perl_malloc(sz);
MEM_SIZE
Perl_malloc_good_size(size_t wanted)
{
- return BUCKET_SIZE_REAL(S_ajust_size_and_find_bucket(&wanted));
+ return BUCKET_SIZE_REAL(adjust_size_and_find_bucket(&wanted));
}
# ifdef BUCKETS_ROOT2