aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/boot/compressed/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m32r/boot/compressed/misc.c')
-rw-r--r--arch/m32r/boot/compressed/misc.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c
index 600d40e33495..d394292498c0 100644
--- a/arch/m32r/boot/compressed/misc.c
+++ b/arch/m32r/boot/compressed/misc.c
@@ -70,8 +70,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */
70static int fill_inbuf(void); 70static int fill_inbuf(void);
71static void flush_window(void); 71static void flush_window(void);
72static void error(char *m); 72static void error(char *m);
73static void gzip_mark(void **);
74static void gzip_release(void **);
75 73
76static unsigned char *input_data; 74static unsigned char *input_data;
77static int input_len; 75static int input_len;
@@ -82,9 +80,6 @@ static unsigned long output_ptr = 0;
82 80
83#include "m32r_sio.c" 81#include "m32r_sio.c"
84 82
85static void *malloc(int size);
86static void free(void *where);
87
88static unsigned long free_mem_ptr; 83static unsigned long free_mem_ptr;
89static unsigned long free_mem_end_ptr; 84static unsigned long free_mem_end_ptr;
90 85
@@ -92,38 +87,6 @@ static unsigned long free_mem_end_ptr;
92 87
93#include "../../../../lib/inflate.c" 88#include "../../../../lib/inflate.c"
94 89
95static void *malloc(int size)
96{
97 void *p;
98
99 if (size <0) error("Malloc error");
100 if (free_mem_ptr == 0) error("Memory error");
101
102 free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */
103
104 p = (void *)free_mem_ptr;
105 free_mem_ptr += size;
106
107 if (free_mem_ptr >= free_mem_end_ptr)
108 error("Out of memory");
109
110 return p;
111}
112
113static void free(void *where)
114{ /* Don't care */
115}
116
117static void gzip_mark(void **ptr)
118{
119 *ptr = (void *) free_mem_ptr;
120}
121
122static void gzip_release(void **ptr)
123{
124 free_mem_ptr = (long) *ptr;
125}
126
127void* memset(void* s, int c, size_t n) 90void* memset(void* s, int c, size_t n)
128{ 91{
129 int i; 92 int i;