Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make initialization more consistent in gc.cpp #75908

Merged
merged 2 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/coreclr/gc/env/volatile.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,7 @@ class Volatile
//
// Default constructor.
//
inline Volatile() : m_val {}
{
}
inline Volatile() = default;

//
// Allow initialization of Volatile<T> from a T
Expand Down
8 changes: 1 addition & 7 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13667,12 +13667,6 @@ gc_heap::init_semi_shared()

memset (full_gc_counts, 0, sizeof (full_gc_counts));

last_ephemeral_gc_info = {};
last_full_blocking_gc_info = {};
#ifdef BACKGROUND_GC
memset (&last_bgc_info, 0, sizeof (last_bgc_info));
#endif //BACKGROUND_GC

should_expand_in_full_gc = FALSE;

#ifdef FEATURE_LOH_COMPACTION
Expand Down Expand Up @@ -28765,7 +28759,7 @@ uint8_t* gc_heap::find_next_marked (uint8_t* x, uint8_t* end,
#ifdef FEATURE_EVENT_TRACE
void gc_heap::init_bucket_info()
{
*bucket_info = {};
memset (bucket_info, 0, sizeof (bucket_info));
}

void gc_heap::add_plug_in_condemned_info (generation* gen, size_t plug_size)
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/gc/gcpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,6 @@ struct etw_bucket_info
uint32_t count;
size_t size;

etw_bucket_info() = default;

void set (uint16_t _index, uint32_t _count, size_t _size)
{
index = _index;
Expand Down
5 changes: 1 addition & 4 deletions src/coreclr/inc/volatile.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ class Volatile
//
// Default constructor.
//
inline Volatile() : m_val {}
{
STATIC_CONTRACT_SUPPORTS_DAC;
}
inline Volatile() = default;

//
// Allow initialization of Volatile<T> from a T
Expand Down