Skip to content

Commit 2d21db8

Browse files
committed
[sgen] Add Ward annotations to sgen_get_total_allocated_bytes
Attempt to fix https://jenkins.mono-project.com/job/test-mono-mainline-staticanalysis/
1 parent b2dba8d commit 2d21db8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/mono/mono/sgen/sgen-gc.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,8 +1130,10 @@ typedef enum {
11301130
} SgenAllocatorType;
11311131

11321132
void sgen_clear_tlabs (void);
1133-
void sgen_update_allocation_count (void);
1134-
guint64 sgen_get_total_allocated_bytes (MonoBoolean precise);
1133+
void sgen_update_allocation_count (void)
1134+
MONO_PERMIT (need (sgen_world_stopped));
1135+
guint64 sgen_get_total_allocated_bytes (MonoBoolean precise)
1136+
MONO_PERMIT (need (sgen_lock_gc, sgen_stop_world));
11351137

11361138
GCObject* sgen_alloc_obj (GCVTable vtable, size_t size)
11371139
MONO_PERMIT (need (sgen_lock_gc, sgen_stop_world));

0 commit comments

Comments
 (0)