Skip to content

Commit

Permalink
VM: merge of the free_list and free_list_allocator classes
Browse files Browse the repository at this point in the history
Seem simpler to have all the free list stuff in one class rather than
split it over two classes.
  • Loading branch information
bjourne committed Oct 8, 2016
1 parent f0eec26 commit c2f4fdb
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 178 deletions.
1 change: 0 additions & 1 deletion GNUmakefile
Expand Up @@ -43,7 +43,6 @@ ifdef CONFIG
vm/entry_points.o \
vm/errors.o \
vm/factor.o \
vm/free_list.o \
vm/full_collector.o \
vm/gc.o \
vm/image.o \
Expand Down
1 change: 0 additions & 1 deletion Nmakefile
Expand Up @@ -67,7 +67,6 @@ DLL_OBJS = $(PLAF_DLL_OBJS) \
vm\entry_points.obj \
vm\errors.obj \
vm\factor.obj \
vm\free_list.obj \
vm\full_collector.obj \
vm\gc.obj \
vm\image.obj \
Expand Down
2 changes: 1 addition & 1 deletion vm/code_blocks.cpp
Expand Up @@ -301,7 +301,7 @@ code_block* factor_vm::allot_code_block(cell size, code_block_type type) {
if (block == NULL) {
std::cout << "Code heap used: " << code->allocator->occupied_space()
<< "\n";
std::cout << "Code heap free: " << code->allocator->free_space() << "\n";
std::cout << "Code heap free: " << code->allocator->free_space << "\n";
fatal_error("Out of memory in add-compiled-block", 0);
}
}
Expand Down
6 changes: 3 additions & 3 deletions vm/data_heap.cpp
Expand Up @@ -93,7 +93,7 @@ bool data_heap::high_fragmentation_p() {
}

bool data_heap::low_memory_p() {
return tenured->free_space() <= high_water_mark();
return tenured->free_space <= high_water_mark();
}

void data_heap::mark_all_cards() {
Expand Down Expand Up @@ -123,9 +123,9 @@ data_heap_room factor_vm::data_room() {
room.aging_free = data->aging->free_space();
room.tenured_size = data->tenured->size;
room.tenured_occupied = data->tenured->occupied_space();
room.tenured_total_free = data->tenured->free_space();
room.tenured_total_free = data->tenured->free_space;
room.tenured_contiguous_free = data->tenured->largest_free_block();
room.tenured_free_block_count = data->tenured->free_block_count();
room.tenured_free_block_count = data->tenured->free_block_count;
room.cards = data->cards_end - data->cards;
room.decks = data->decks_end - data->decks;
room.mark_stack = mark_stack.capacity() * sizeof(cell);
Expand Down
118 changes: 0 additions & 118 deletions vm/free_list.cpp

This file was deleted.

0 comments on commit c2f4fdb

Please sign in to comment.