diff options
-rw-r--r-- | dosish.h | 17 | ||||
-rw-r--r-- | malloc.c | 11 | ||||
-rw-r--r-- | sv.c | 11 | ||||
-rw-r--r-- | util.c | 25 |
4 files changed, 3 insertions, 61 deletions
@@ -58,23 +58,6 @@ #endif #define dXSUB_SYS -/* - * 5.003_07 and earlier keyed on #ifdef MSDOS for determining if we were - * running on DOS, *and* if we had to cope with 16 bit memory addressing - * constraints, *and* we need to have memory allocated as unsigned long. - * - * with the advent of *real* compilers for DOS, they are not locked together. - * MSDOS means "I am running on MSDOS". HAS_64K_LIMIT means "I have - * 16 bit memory addressing constraints". - * - * if you need the last, try #DEFINE MEM_SIZE unsigned long. - */ -#ifdef MSDOS -# ifndef DJGPP -# define HAS_64K_LIMIT -# endif -#endif - /* USEMYBINMODE * This symbol, if defined, indicates that the program should * use the routine my_binmode(FILE *fp, char iotype, int mode) to insure @@ -755,16 +755,7 @@ static const char bucket_of[] = # 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 @@ -1479,13 +1479,6 @@ Perl_sv_grow(pTHX_ SV *const sv, STRLEN newlen) PERL_ARGS_ASSERT_SV_GROW; -#ifdef HAS_64K_LIMIT - if (newlen >= 0x10000) { - PerlIO_printf(Perl_debug_log, - "Allocation too large: %"UVxf"\n", (UV)newlen); - my_exit(1); - } -#endif /* HAS_64K_LIMIT */ if (SvROK(sv)) sv_unref(sv); if (SvTYPE(sv) < SVt_PV) { @@ -1497,10 +1490,6 @@ Perl_sv_grow(pTHX_ SV *const sv, STRLEN newlen) s = SvPVX_mutable(sv); if (newlen > SvLEN(sv)) newlen += 10 * (newlen - SvCUR(sv)); /* avoid copy each time */ -#ifdef HAS_64K_LIMIT - if (newlen >= 0x10000) - newlen = 0xFFFF; -#endif } else { @@ -76,13 +76,6 @@ Perl_safesysmalloc(MEM_SIZE size) dTHX; #endif Malloc_t ptr; -#ifdef HAS_64K_LIMIT - if (size > 0xffff) { - PerlIO_printf(Perl_error_log, - "Allocation too large: %lx\n", size) FLUSH; - my_exit(1); - } -#endif /* HAS_64K_LIMIT */ #ifdef PERL_TRACK_MEMPOOL size += sTHX; #endif @@ -143,13 +136,6 @@ Perl_safesysrealloc(Malloc_t where,MEM_SIZE size) Malloc_t PerlMem_realloc(); #endif /* !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) */ -#ifdef HAS_64K_LIMIT - if (size > 0xffff) { - PerlIO_printf(Perl_error_log, - "Reallocation too large: %lx\n", size) FLUSH; - my_exit(1); - } -#endif /* HAS_64K_LIMIT */ if (!size) { safesysfree(where); return NULL; @@ -289,13 +275,13 @@ Perl_safesyscalloc(MEM_SIZE count, MEM_SIZE size) dTHX; #endif Malloc_t ptr; -#if defined(PERL_TRACK_MEMPOOL) || defined(HAS_64K_LIMIT) || defined(DEBUGGING) +#if defined(PERL_TRACK_MEMPOOL) || defined(DEBUGGING) MEM_SIZE total_size = 0; #endif /* Even though calloc() for zero bytes is strange, be robust. */ if (size && (count <= MEM_SIZE_MAX / size)) { -#if defined(PERL_TRACK_MEMPOOL) || defined(HAS_64K_LIMIT) || defined(DEBUGGING) +#if defined(PERL_TRACK_MEMPOOL) || defined(DEBUGGING) total_size = size * count; #endif } @@ -307,13 +293,6 @@ Perl_safesyscalloc(MEM_SIZE count, MEM_SIZE size) else croak_memory_wrap(); #endif -#ifdef HAS_64K_LIMIT - if (total_size > 0xffff) { - PerlIO_printf(Perl_error_log, - "Allocation too large: %lx\n", total_size) FLUSH; - my_exit(1); - } -#endif /* HAS_64K_LIMIT */ #ifdef DEBUGGING if ((SSize_t)size < 0 || (SSize_t)count < 0) Perl_croak_nocontext("panic: calloc, size=%"UVuf", count=%"UVuf, |