#define MIN_BUC_POW2 (sizeof(void*) > 4 ? 3 : 2) /* Allow for 4-byte arena. */
#define MIN_BUCKET (MIN_BUC_POW2 * BUCKETS_PER_POW2)
-#if !(defined(I286) || defined(atarist))
- /* take 2k unless the block is bigger than that */
-# define LOG_OF_MIN_ARENA 11
-#else
- /* take 16k unless the block is bigger than that
- (80286s like large segments!), probably good on the atari too */
-# define LOG_OF_MIN_ARENA 14
-#endif
+#define LOG_OF_MIN_ARENA 11
#if defined(DEBUGGING) && !defined(NO_RCHECK)
# define RCHECK
*/
#define u_short unsigned short
-/* 286 and atarist like big chunks, which gives too much overhead. */
-#if (defined(RCHECK) || defined(I286) || defined(atarist)) && defined(PACK_MALLOC)
+#if defined(RCHECK) && defined(PACK_MALLOC)
# undef PACK_MALLOC
#endif
char c;
void *p;
};
-# define ALIGN_SMALL ((int)((caddr_t)&(((struct aligner*)0)->p)))
+# define ALIGN_SMALL ((IV)((caddr_t)&(((struct aligner*)0)->p)))
#else
# define ALIGN_SMALL MEM_ALIGNBYTES
#endif
do_croak:
MALLOC_UNLOCK;
emergency_sbrk_croak("Out of memory during request for %"UVuf" bytes, total sbrk() is %"UVuf" bytes", (UV)size, (UV)(goodsbrk + sbrk_slack));
- /* NOTREACHED */
+ assert(0); /* NOTREACHED */
return NULL;
}
require = FIRST_SBRK;
else if (require < (MEM_SIZE)MIN_SBRK) require = MIN_SBRK;
- if (require < goodsbrk * MIN_SBRK_FRAC1000 / 1000)
+ if (require < (Size_t)(goodsbrk * MIN_SBRK_FRAC1000 / 1000))
require = goodsbrk * MIN_SBRK_FRAC1000 / 1000;
require = ((require - 1 + MIN_SBRK) / MIN_SBRK) * MIN_SBRK;
} else {
/* Second, check alignment. */
slack = 0;
-#if !defined(atarist) /* on the atari we dont have to worry about this */
-# ifndef I286 /* The sbrk(0) call on the I286 always returns the next segment */
/* WANTED_ALIGNMENT may be more than NEEDED_ALIGNMENT, but this may
improve performance of memory access. */
if (PTR2UV(cp) & (WANTED_ALIGNMENT - 1)) { /* Not aligned. */
slack = WANTED_ALIGNMENT - (PTR2UV(cp) & (WANTED_ALIGNMENT - 1));
add += slack;
}
-# endif
-#endif /* !atarist */
if (add) {
DEBUG_m(PerlIO_printf(Perl_debug_log,
fatalcroak("Misalignment of sbrk()\n");
else
# endif
-#ifndef I286 /* Again, this should always be ok on an 80286 */
if (PTR2UV(ovp) & (MEM_ALIGNBYTES - 1)) {
DEBUG_m(PerlIO_printf(Perl_debug_log,
"fixing sbrk(): %d bytes off machine alignment\n",
sbrk_slack += (1 << (bucket >> BUCKET_POW2_SHIFT));
# endif
}
-#endif
; /* Finish "else" */
sbrked_remains = require - needed;
last_op = cp;