summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2013-08-30 20:25:12 -0300
committerBrian Fraser <fraserbn@gmail.com>2013-09-21 08:47:39 -0300
commit39c0d7ee897c13cceed4e2b5712cd4e88315336a (patch)
tree2be65d7668376016d49e41d6e32f3c9902715ebc /util.c
parent25d5035bd3a23a0e15661d46ad1adbbd05249de0 (diff)
downloadperl-39c0d7ee897c13cceed4e2b5712cd4e88315336a.tar.gz
Remove HAS_64K_LIMIT
This was only defined for MSDOS if not using DJGPP. We've long since dropped support for that, so this define and related code can go.
Diffstat (limited to 'util.c')
-rw-r--r--util.c25
1 files changed, 2 insertions, 23 deletions
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,