8 /* The routines allocate more space for the segments and update the
9 * global variables. Each time the space asked for is multiplied with 2.
14 /* print( "text_area too small %d %d \n", text_area, text); */
15 int diff = text - text_area;
17 text_area = Realloc( text_area, sizeof( char) * 2 * size_text);
18 text = text_area + diff;
19 text_cnt += size_text;
20 size_text = 2 * size_text;
26 /* print( "data_area too small\n"); */
27 int diff = data - data_area;
29 data_area = Realloc( data_area, sizeof( char) * 2 * size_data);
30 data = data_area + diff;
31 data_cnt += size_data;
32 size_data = 2 * size_data;
38 /* print( "symbol_table out of memory\n"); */
40 size_symbol = 2 * size_symbol;
41 symbol_table = (struct outname *) Realloc( (char *) symbol_table,
42 sizeof( struct outname) * size_symbol);
44 /* print( "hash out of memory\n"); */
46 Hashitems = (struct Hashitem *) Realloc( (char *) Hashitems,
47 sizeof( struct Hashitem)*(size_symbol+1));
53 /* print( "reloc_table out of memory\n"); */
54 int diff = relo - reloc_info;
56 reloc_info = (struct outrelo *) Realloc( (char *) reloc_info,
57 sizeof( struct outrelo) * 2 * size_reloc);
58 relo = reloc_info + diff;
59 size_reloc = 2 * size_reloc;
65 int diff = string - string_area;
67 /* print( "string_area out of memory %d %d \n", string_area, string);*/
69 size_string = 2 * size_string;
70 string_area = Realloc( string_area, sizeof( char) * size_string);
71 string = string_area + diff;