projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e398ff
)
Added some parenthesis and a cast to control order of operations. (#32640)
author
Nathan Ricci
<naricc@microsoft.com>
Fri, 21 Feb 2020 18:50:55 +0000
(13:50 -0500)
committer
GitHub
<noreply@github.com>
Fri, 21 Feb 2020 18:50:55 +0000
(13:50 -0500)
Fix intermittent negative values from GetTotalBytesAllocated.
src/mono/mono/metadata/sgen-mono.c
patch
|
blob
|
history
diff --git
a/src/mono/mono/metadata/sgen-mono.c
b/src/mono/mono/metadata/sgen-mono.c
index
038f435
..
d9baf86
100644
(file)
--- a/
src/mono/mono/metadata/sgen-mono.c
+++ b/
src/mono/mono/metadata/sgen-mono.c
@@
-2639,7
+2639,7
@@
mono_gc_get_allocated_bytes_for_current_thread (void)
info = mono_thread_info_current ();
/*There are some more allocated bytes in the current tlab that have not been recorded yet */
- return info->total_bytes_allocated +
info->tlab_next - info->tlab_start
;
+ return info->total_bytes_allocated +
(ptrdiff_t)(info->tlab_next - info->tlab_start)
;
}
guint64