diff options
| author | Kenichi Handa | 2012-10-06 21:55:09 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2012-10-06 21:55:09 +0900 |
| commit | 16ddec7e9e6adcf615db097d9627d490ca29208c (patch) | |
| tree | 1c16b9565c9cca81ec8f5b10f0f4110340d4654a /src/ralloc.c | |
| parent | 2b89bca49d55cec1a004353354a76de2972c68f3 (diff) | |
| parent | d5acb99a199d83cde1a43482709c3e9d4ec34b2f (diff) | |
| download | emacs-16ddec7e9e6adcf615db097d9627d490ca29208c.tar.gz emacs-16ddec7e9e6adcf615db097d9627d490ca29208c.zip | |
merge trunk
Diffstat (limited to 'src/ralloc.c')
| -rw-r--r-- | src/ralloc.c | 16 |
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. */ |
| 75 | POINTER (*real_morecore) (long int); | 75 | POINTER (*real_morecore) (ptrdiff_t); |
| 76 | 76 | ||
| 77 | /* The break value, as seen by malloc. */ | 77 | /* The break value, as seen by malloc. */ |
| 78 | static POINTER virtual_break_value; | 78 | static 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 |
| 105 | extern POINTER (*__morecore) (long int); | 105 | extern POINTER (*__morecore) (ptrdiff_t); |
| 106 | #endif | 106 | #endif |
| 107 | 107 | ||
| 108 | 108 | ||
| @@ -308,7 +308,7 @@ static void | |||
| 308 | relinquish (void) | 308 | relinquish (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 | ||
| 754 | static POINTER | 754 | static POINTER |
| 755 | r_alloc_sbrk (long int size) | 755 | r_alloc_sbrk (ptrdiff_t size) |
| 756 | { | 756 | { |
| 757 | register bloc_ptr b; | 757 | register bloc_ptr b; |
| 758 | POINTER address; | 758 | POINTER address; |