@@ -135,10 +135,10 @@ static void init(void) {
135
135
sigaction (SIGSEGV, &act, NULL );
136
136
137
137
138
- signal (SIGABRT, handle_sig);
138
+ // signal(SIGABRT, handle_sig);
139
139
// signal(SIGSEGV, handle_sig);
140
- signal (SIGBUS, handle_sig);
141
- signal (SIGILL, handle_sig);
140
+ // signal(SIGBUS, handle_sig);
141
+ // signal(SIGILL, handle_sig);
142
142
}
143
143
144
144
@@ -162,21 +162,16 @@ void __attribute__((constructor(102))) alaska_init(void) {
162
162
}
163
163
164
164
void __attribute__ ((destructor)) alaska_deinit(void ) {
165
- // if (the_runtime != NULL) {
166
- // if (tc != NULL) {
167
- // the_runtime->del_threadcache(tc);
168
- // }
169
- // delete the_runtime;
170
- // }
171
- // set_ht_addr(0);
172
165
}
173
166
174
167
static void *_halloc (size_t sz, int zero) {
168
+ // HACK: make it so we *always* zero the data to avoid pagefaults
169
+ // *this is slow*
170
+ zero = 1 ;
175
171
void *result = NULL ;
176
172
177
173
result = get_tc ()->halloc (sz, zero);
178
174
auto m = (uintptr_t )alaska::Mapping::translate (result);
179
- printf (" halloc(%zu) -> %p (%zx-%zx)\n " , sz, result, m, m + sz);
180
175
if (result == NULL ) errno = ENOMEM;
181
176
182
177
return result;
@@ -223,7 +218,6 @@ extern "C" void *hrealloc(void *handle, size_t new_size) {
223
218
224
219
225
220
extern " C" void hfree (void *ptr) {
226
- printf (" hfree %p\n " , ptr);
227
221
// no-op if NULL is passed
228
222
if (unlikely (ptr == NULL )) return ;
229
223
0 commit comments