|
1 | | - |
2 | 1 | // this file is included by ractor.c |
3 | 2 |
|
4 | 3 | struct ractor_port { |
@@ -32,7 +31,7 @@ ractor_port_mark(void *ptr) |
32 | 31 | static void |
33 | 32 | ractor_port_free(void *ptr) |
34 | 33 | { |
35 | | - xfree(ptr); |
| 34 | + SIZED_FREE((struct ractor_port *)ptr); |
36 | 35 | } |
37 | 36 |
|
38 | 37 | static size_t |
@@ -231,7 +230,7 @@ ractor_basket_mark(const struct ractor_basket *b) |
231 | 230 | static void |
232 | 231 | ractor_basket_free(struct ractor_basket *b) |
233 | 232 | { |
234 | | - xfree(b); |
| 233 | + SIZED_FREE(b); |
235 | 234 | } |
236 | 235 |
|
237 | 236 | static struct ractor_basket * |
@@ -285,7 +284,7 @@ ractor_queue_free(struct ractor_queue *rq) |
285 | 284 |
|
286 | 285 | VM_ASSERT(ccan_list_empty(&rq->set)); |
287 | 286 |
|
288 | | - xfree(rq); |
| 287 | + SIZED_FREE(rq); |
289 | 288 | } |
290 | 289 |
|
291 | 290 | RBIMPL_ATTR_MAYBE_UNUSED() |
@@ -575,7 +574,7 @@ ractor_monitor(rb_execution_context_t *ec, VALUE self, VALUE port) |
575 | 574 | RACTOR_UNLOCK(r); |
576 | 575 |
|
577 | 576 | if (terminated) { |
578 | | - xfree(rm); |
| 577 | + SIZED_FREE(rm); |
579 | 578 | ractor_port_send(ec, port, ractor_exit_token(r->sync.legacy_exc), Qfalse); |
580 | 579 |
|
581 | 580 | return Qfalse; |
@@ -603,7 +602,7 @@ ractor_unmonitor(rb_execution_context_t *ec, VALUE self, VALUE port) |
603 | 602 | (unsigned int)ractor_port_id(&rm->port), |
604 | 603 | (unsigned int)rb_ractor_id(rm->port.r)); |
605 | 604 | ccan_list_del(&rm->node); |
606 | | - xfree(rm); |
| 605 | + SIZED_FREE(rm); |
607 | 606 | } |
608 | 607 | } |
609 | 608 | } |
@@ -641,7 +640,7 @@ ractor_notify_exit(rb_execution_context_t *ec, rb_ractor_t *cr, VALUE legacy, bo |
641 | 640 | ractor_try_send(ec, &rm->port, token, false); |
642 | 641 |
|
643 | 642 | ccan_list_del(&rm->node); |
644 | | - xfree(rm); |
| 643 | + SIZED_FREE(rm); |
645 | 644 | } |
646 | 645 |
|
647 | 646 | VM_ASSERT(ccan_list_empty(&cr->sync.monitors)); |
@@ -1260,7 +1259,7 @@ ractor_selector_free(void *ptr) |
1260 | 1259 | { |
1261 | 1260 | struct ractor_selector *s = ptr; |
1262 | 1261 | st_free_table(s->ports); |
1263 | | - ruby_xfree(ptr); |
| 1262 | + SIZED_FREE(s); |
1264 | 1263 | } |
1265 | 1264 |
|
1266 | 1265 | static size_t |
|
0 commit comments