Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyufjh committed Sep 29, 2023
1 parent d13480d commit 3469b2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/compute/src/memory_management/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl JemallocMemoryControl {
.unwrap()
.to_string();

// FIXME: file_path_str is leaked
// `file_path_str` is leaked because `jemalloc_dump_mib.write` requires static lifetime
let file_path_str = Box::leak(file_path.into_boxed_str());
let file_path_bytes = file_path_str.as_bytes();
if let Err(e) = self
Expand Down
2 changes: 1 addition & 1 deletion src/compute/src/rpc/service/monitor_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl MonitorService for MonitorServiceImpl {
.to_str()
.ok_or_else(|| Status::internal("The file dir is not a UTF-8 String"))?;

// FIXME: file_path_str is leaked
// `file_path_str` is leaked because `prof::dump::write` requires static lifetime
let file_path_str = Box::leak(file_path.to_string().into_boxed_str());
let file_path_bytes = file_path_str.as_bytes();
let response = if let Err(e) = tikv_jemalloc_ctl::prof::dump::write(
Expand Down

0 comments on commit 3469b2c

Please sign in to comment.