Add a malloc_dyn upcall for dynamically sized allocations on the shared heap.
This commit is contained in:
parent
31f4b63dff
commit
4c0d41cffa
7 changed files with 103 additions and 40 deletions
|
|
@ -11,6 +11,7 @@ type upcalls =
|
|||
{_fail: ValueRef,
|
||||
trace: ValueRef,
|
||||
malloc: ValueRef,
|
||||
malloc_dyn: ValueRef,
|
||||
free: ValueRef,
|
||||
exchange_malloc: ValueRef,
|
||||
exchange_malloc_dyn: ValueRef,
|
||||
|
|
@ -58,6 +59,9 @@ fn declare_upcalls(targ_cfg: @session::config,
|
|||
int_t]),
|
||||
malloc:
|
||||
nothrow(d("malloc", [T_ptr(tydesc_type)],
|
||||
malloc_dyn:
|
||||
nothrow(d("malloc_dyn",
|
||||
[T_ptr(tydesc_type), int_t],
|
||||
T_ptr(T_i8()))),
|
||||
free:
|
||||
nothrow(dv("free", [T_ptr(T_i8())])),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue