Skip to content

Commit acff2ad

Browse files
committed
localizer cleanup
1 parent 59a8e74 commit acff2ad

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

runtime/core/Localizer.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace alaska {
2727
}
2828

2929
void Localizer::feed_hotness_buffer(size_t count, handle_id_t *handle_ids) {
30+
#if 1
3031
auto &rt = alaska::Runtime::get();
3132

3233
unsigned long moved_objects = 0;
@@ -63,12 +64,14 @@ namespace alaska {
6364
}
6465

6566

67+
6668
// rt.heap.compact_locality_pages();
67-
// rt.heap.compact_sizedpages();
69+
rt.heap.compact_sizedpages();
6870
});
6971

7072
printf("moved:%5lu unmoved:%5lu bytes:%12lu reach:%12lu\n", moved_objects, unmoved_objects,
7173
bytes_in_dump, bytes_reach);
74+
#endif
7275

7376
alaska_internal_free(reinterpret_cast<void *>(handle_ids));
7477
}

runtime/rt/sim.cpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,14 @@ static void *sim_background_thread_func(void *) {
107107
}
108108

109109
static void __attribute__((constructor)) sim_init(void) {
110-
printf("Simulation name: ");
111-
fflush(stdout);
112-
fgets(sim_name, sizeof(sim_name), stdin);
113-
size_t len = strlen(sim_name);
114-
if (len > 0 && sim_name[len - 1] == '\n') {
115-
sim_name[len - 1] = '\0';
116-
}
110+
// printf("Simulation name: ");
111+
// fflush(stdout);
112+
// fgets(sim_name, sizeof(sim_name), stdin);
113+
// size_t len = strlen(sim_name);
114+
// if (len > 0 && sim_name[len - 1] == '\n') {
115+
// sim_name[len - 1] = '\0';
116+
// }
117+
strncpy(sim_name, "sim", sizeof(sim_name) - 1);
117118

118119
pthread_create(&sim_background_thread, NULL, sim_background_thread_func, NULL);
119120
}

0 commit comments

Comments
 (0)