diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-05-03 00:36:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 00:36:33 +0200 |
commit | 798c1ad0f1de80ff0e7196b6140a3f74e31fe111 (patch) | |
tree | 44233e68b9846ee3335b68b3ddaff00bec76d91f /cli/napi/async.rs | |
parent | adcda4fa640939682076e793f12a5b22e3de1f50 (diff) |
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.
Diffstat (limited to 'cli/napi/async.rs')
-rw-r--r-- | cli/napi/async.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/napi/async.rs b/cli/napi/async.rs index 8cbdb2220..e6695551a 100644 --- a/cli/napi/async.rs +++ b/cli/napi/async.rs @@ -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(()) } |