unsafe fn alloc_main_thread(layout: Layout) -> *mut u8
Allocate memory on the R main thread.
Must be called from R’s main thread.