summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dosish.h17
-rw-r--r--malloc.c11
-rw-r--r--sv.c11
-rw-r--r--util.c25
4 files changed, 3 insertions, 61 deletions
diff --git a/dosish.h b/dosish.h
index 8c3917b510..8b34369ab5 100644
--- a/dosish.h
+++ b/dosish.h
@@ -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
diff --git a/malloc.c b/malloc.c
index a0a762e9ac..79a8c89107 100644
--- a/malloc.c
+++ b/malloc.c
@@ -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
diff --git a/sv.c b/sv.c
index 41f9d17ba0..f32ac81807 100644
--- a/sv.c
+++ b/sv.c
@@ -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
{
diff --git a/util.c b/util.c
index 6227474e76..6a499f188a 100644
--- a/util.c
+++ b/util.c
@@ -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,