1057 |
} |
} |
1058 |
#endif |
#endif |
1059 |
|
|
1060 |
|
/* configure size, static init ? */ |
1061 |
|
static char bfd_buf[/* 4392 */5000]; |
1062 |
|
static char *bfd_buf_p=bfd_buf; |
1063 |
|
|
1064 |
|
static void * |
1065 |
|
bfd_malloc(int n) { |
1066 |
|
|
1067 |
|
char *c; |
1068 |
|
|
1069 |
|
c=bfd_buf_p; |
1070 |
|
n+=7; |
1071 |
|
n>>=3; |
1072 |
|
n<<=3; |
1073 |
|
if (c+n>bfd_buf+sizeof(bfd_buf)) { |
1074 |
|
fprintf(stderr,"Not enough space in bfd_buf %d %d\n",n,sizeof(bfd_buf)-(bfd_buf_p-bfd_buf)); |
1075 |
|
exit(1); |
1076 |
|
} |
1077 |
|
bfd_buf_p+=n; |
1078 |
|
return (void *)c; |
1079 |
|
|
1080 |
|
} |
1081 |
|
|
1082 |
char * |
char * |
1083 |
malloc(size) |
malloc(size) |
1084 |
int size; |
int size; |
1085 |
{ |
{ |
1086 |
object x; |
extern int in_bfd_init; |
1087 |
|
object x; |
1088 |
|
|
1089 |
|
if (in_bfd_init) |
1090 |
|
return bfd_malloc(size); |
1091 |
|
|
1092 |
#ifdef BABY_MALLOC_SIZE |
#ifdef BABY_MALLOC_SIZE |
1093 |
if (GBC_enable == 0) return baby_malloc(size); |
if (GBC_enable == 0) return baby_malloc(size); |
1223 |
#endif |
#endif |
1224 |
|
|
1225 |
|
|
1226 |
#ifndef GNU_MALLOC |
#ifndef GNUMALLOC |
1227 |
char * |
char * |
1228 |
memalign(align,size) |
memalign(align,size) |
1229 |
int align,size; |
int align,size; |