perf: use jemalloc as global allocator (#18957)

Follow up to https://github.com/denoland/deno/pull/18875 that enables
`jemalloc` as a global allocator for the Deno CLI.
This commit is contained in:
Bartek Iwańczuk 2023-05-03 00:36:33 +02:00 committed by GitHub
parent adcda4fa64
commit 798c1ad0f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 42 additions and 11 deletions

View file

@ -24,7 +24,8 @@ fn napi_create_async_work(
execute,
complete,
};
*result = transmute::<Box<AsyncWork>, _>(Box::new(work));
let work_box = Box::new(work);
*result = transmute::<*mut AsyncWork, _>(Box::into_raw(work_box));
Ok(())
}