diff options
Diffstat (limited to 'src/ralloc.c')
| -rw-r--r-- | src/ralloc.c | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/ralloc.c b/src/ralloc.c index 0a2b156e393..5f2b52fcc4b 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -79,7 +79,7 @@ static void r_alloc_init (void); | |||
| 79 | /* Declarations for working with the malloc, ralloc, and system breaks. */ | 79 | /* Declarations for working with the malloc, ralloc, and system breaks. */ |
| 80 | 80 | ||
| 81 | /* Function to set the real break value. */ | 81 | /* Function to set the real break value. */ |
| 82 | POINTER (*real_morecore) (); | 82 | POINTER (*real_morecore) (long int); |
| 83 | 83 | ||
| 84 | /* The break value, as seen by malloc. */ | 84 | /* The break value, as seen by malloc. */ |
| 85 | static POINTER virtual_break_value; | 85 | static POINTER virtual_break_value; |
| @@ -111,7 +111,7 @@ static int extra_bytes; | |||
| 111 | from the system. */ | 111 | from the system. */ |
| 112 | 112 | ||
| 113 | #ifndef SYSTEM_MALLOC | 113 | #ifndef SYSTEM_MALLOC |
| 114 | extern POINTER (*__morecore) (); | 114 | extern POINTER (*__morecore) (long int); |
| 115 | #endif | 115 | #endif |
| 116 | 116 | ||
| 117 | 117 | ||
| @@ -519,35 +519,6 @@ relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address) | |||
| 519 | 519 | ||
| 520 | return 1; | 520 | return 1; |
| 521 | } | 521 | } |
| 522 | |||
| 523 | /* Reorder the bloc BLOC to go before bloc BEFORE in the doubly linked list. | ||
| 524 | This is necessary if we put the memory of space of BLOC | ||
| 525 | before that of BEFORE. */ | ||
| 526 | |||
| 527 | static void | ||
| 528 | reorder_bloc (bloc_ptr bloc, bloc_ptr before) | ||
| 529 | { | ||
| 530 | bloc_ptr prev, next; | ||
| 531 | |||
| 532 | /* Splice BLOC out from where it is. */ | ||
| 533 | prev = bloc->prev; | ||
| 534 | next = bloc->next; | ||
| 535 | |||
| 536 | if (prev) | ||
| 537 | prev->next = next; | ||
| 538 | if (next) | ||
| 539 | next->prev = prev; | ||
| 540 | |||
| 541 | /* Splice it in before BEFORE. */ | ||
| 542 | prev = before->prev; | ||
| 543 | |||
| 544 | if (prev) | ||
| 545 | prev->next = bloc; | ||
| 546 | bloc->prev = prev; | ||
| 547 | |||
| 548 | before->prev = bloc; | ||
| 549 | bloc->next = before; | ||
| 550 | } | ||
| 551 | 522 | ||
| 552 | /* Update the records of which heaps contain which blocs, starting | 523 | /* Update the records of which heaps contain which blocs, starting |
| 553 | with heap HEAP and bloc BLOC. */ | 524 | with heap HEAP and bloc BLOC. */ |