summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2005-03-31 07:36:52 +0000
committerSteve Hay <SteveHay@planit.com>2005-03-31 07:36:52 +0000
commit575fbe19638bbb2c64232d56697c4e2bd450b1de (patch)
tree50c7761df7c683b0b8f372b7df522e85caabe5aa /malloc.c
parent8ab815d325c0064e12998204098708d4bb1b7b88 (diff)
downloadperl-575fbe19638bbb2c64232d56697c4e2bd450b1de.tar.gz
Another Win32 compilation clean-up (for when using Perl's malloc)
p4raw-id: //depot/perl@24108
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/malloc.c b/malloc.c
index 6d5635228a..fe5960ba0b 100644
--- a/malloc.c
+++ b/malloc.c
@@ -1226,14 +1226,15 @@ emergency_sbrk(MEM_SIZE size)
MEM_SIZE rsize = (((size - 1)>>LOG_OF_MIN_ARENA) + 1)<<LOG_OF_MIN_ARENA;
if (size >= BIG_SIZE
- && (!emergency_buffer_last_req || (size < emergency_buffer_last_req))) {
+ && (!emergency_buffer_last_req ||
+ (size < (MEM_SIZE)emergency_buffer_last_req))) {
/* Give the possibility to recover, but avoid an infinite cycle. */
MALLOC_UNLOCK;
emergency_buffer_last_req = size;
emergency_sbrk_croak("Out of memory during \"large\" request for %"UVuf" bytes, total sbrk() is %"UVuf" bytes", (UV)size, (UV)(goodsbrk + sbrk_slack));
}
- if (emergency_buffer_size >= rsize) {
+ if ((MEM_SIZE)emergency_buffer_size >= rsize) {
char *old = emergency_buffer;
emergency_buffer_size -= rsize;
@@ -1673,9 +1674,9 @@ getpages(MEM_SIZE needed, int *nblksp, int bucket)
MEM_SIZE slack = 0;
if (sbrk_goodness > 0) {
- if (!last_sbrk_top && require < FIRST_SBRK)
+ if (!last_sbrk_top && require < (MEM_SIZE)FIRST_SBRK)
require = FIRST_SBRK;
- else if (require < MIN_SBRK) require = MIN_SBRK;
+ else if (require < (MEM_SIZE)MIN_SBRK) require = MIN_SBRK;
if (require < goodsbrk * MIN_SBRK_FRAC1000 / 1000)
require = goodsbrk * MIN_SBRK_FRAC1000 / 1000;