aboutsummaryrefslogtreecommitdiffstats
path: root/src/ralloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ralloc.c')
-rw-r--r--src/ralloc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ralloc.c b/src/ralloc.c
index ab91baae5b5..e4a8fe9c6da 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -72,7 +72,7 @@ static void r_alloc_init (void);
72/* Declarations for working with the malloc, ralloc, and system breaks. */ 72/* Declarations for working with the malloc, ralloc, and system breaks. */
73 73
74/* Function to set the real break value. */ 74/* Function to set the real break value. */
75POINTER (*real_morecore) (long int); 75POINTER (*real_morecore) (ptrdiff_t);
76 76
77/* The break value, as seen by malloc. */ 77/* The break value, as seen by malloc. */
78static POINTER virtual_break_value; 78static POINTER virtual_break_value;
@@ -91,18 +91,18 @@ static int extra_bytes;
91/* Macros for rounding. Note that rounding to any value is possible 91/* Macros for rounding. Note that rounding to any value is possible
92 by changing the definition of PAGE. */ 92 by changing the definition of PAGE. */
93#define PAGE (getpagesize ()) 93#define PAGE (getpagesize ())
94#define ROUNDUP(size) (((unsigned long int) (size) + page_size - 1) \ 94#define ROUNDUP(size) (((size_t) (size) + page_size - 1) \
95 & ~(page_size - 1)) 95 & ~((size_t)(page_size - 1)))
96 96
97#define MEM_ALIGN sizeof (double) 97#define MEM_ALIGN sizeof (double)
98#define MEM_ROUNDUP(addr) (((unsigned long int)(addr) + MEM_ALIGN - 1) \ 98#define MEM_ROUNDUP(addr) (((size_t)(addr) + MEM_ALIGN - 1) \
99 & ~(MEM_ALIGN - 1)) 99 & ~(MEM_ALIGN - 1))
100 100
101/* The hook `malloc' uses for the function which gets more space 101/* The hook `malloc' uses for the function which gets more space
102 from the system. */ 102 from the system. */
103 103
104#ifndef SYSTEM_MALLOC 104#ifndef SYSTEM_MALLOC
105extern POINTER (*__morecore) (long int); 105extern POINTER (*__morecore) (ptrdiff_t);
106#endif 106#endif
107 107
108 108
@@ -308,7 +308,7 @@ static void
308relinquish (void) 308relinquish (void)
309{ 309{
310 register heap_ptr h; 310 register heap_ptr h;
311 long excess = 0; 311 ptrdiff_t excess = 0;
312 312
313 /* Add the amount of space beyond break_value 313 /* Add the amount of space beyond break_value
314 in all heaps which have extend beyond break_value at all. */ 314 in all heaps which have extend beyond break_value at all. */
@@ -752,7 +752,7 @@ free_bloc (bloc_ptr bloc)
752 GNU malloc package. */ 752 GNU malloc package. */
753 753
754static POINTER 754static POINTER
755r_alloc_sbrk (long int size) 755r_alloc_sbrk (ptrdiff_t size)
756{ 756{
757 register bloc_ptr b; 757 register bloc_ptr b;
758 POINTER address; 758 POINTER address;