Skip to content

Commit

Permalink
Fix doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
k-sareen committed Apr 23, 2024
1 parent 2167824 commit 897ea9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ fn wrap_libc_call<T: PartialEq>(f: &dyn Fn() -> T, expect: T) -> Result<()> {

/// Get the memory maps for the process. The returned string is a multi-line string.
/// This is only meant to be used for debugging. For example, log process memory maps after detecting a clash.
/// If we would need to parsable memory maps, I would suggest using a library instead which saves us the trouble to deal with portability.
#[cfg(any(target_os = "linux", target_os = "android"))]
pub fn get_process_memory_maps() -> String {
// print map
Expand All @@ -245,6 +244,8 @@ pub fn get_process_memory_maps() -> String {
data
}

/// Get the memory maps for the process. The returned string is a multi-line string.
/// This is only meant to be used for debugging. For example, log process memory maps after detecting a clash.
#[cfg(not(any(target_os = "linux", target_os = "android")))]
pub fn get_process_memory_maps() -> String {
"(process map unavailable)".to_string()
Expand Down

0 comments on commit 897ea9a

Please sign in to comment.