Add a malloc_dyn upcall for dynamically sized allocations on the shared heap.
This commit is contained in:
@@ -104,6 +104,13 @@ make_str_vec(rust_kernel* kernel, size_t nstrs, char **strs) {
|
||||
return v;
|
||||
}
|
||||
|
||||
inline size_t get_box_size(size_t body_size, size_t body_align) {
|
||||
size_t header_size = sizeof(rust_opaque_box);
|
||||
// FIXME: This alignment calculation is suspicious. Is it right?
|
||||
size_t total_size = align_to(header_size, body_align) + body_size;
|
||||
return total_size;
|
||||
}
|
||||
|
||||
// Initialization helpers for ISAAC RNG
|
||||
|
||||
inline void isaac_seed(rust_kernel* kernel, uint8_t* dest)
|
||||
|
||||
Reference in New Issue
Block a user