mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8214272: Don't use memset to initialize arrays of MemoryUsage in memoryManager.cpp
Reviewed-by: rkennke, shade
This commit is contained in:
parent
7e0040c384
commit
bc98309953
@ -1208,9 +1208,7 @@ MachNode *Matcher::match_sfpt( SafePointNode *sfpt ) {
|
||||
// Allocate a private array of RegMasks. These RegMasks are not shared.
|
||||
msfpt->_in_rms = NEW_RESOURCE_ARRAY( RegMask, cnt );
|
||||
// Empty them all.
|
||||
for (uint i = 0; i < cnt; i++) {
|
||||
msfpt->_in_rms[i] = RegMask();
|
||||
}
|
||||
for (uint i = 0; i < cnt; i++) ::new (&(msfpt->_in_rms[i])) RegMask();
|
||||
|
||||
// Do all the pre-defined non-Empty register masks
|
||||
msfpt->_in_rms[TypeFunc::ReturnAdr] = _return_addr_mask;
|
||||
|
||||
@ -168,9 +168,8 @@ void GCStatInfo::clear() {
|
||||
_index = 0;
|
||||
_start_time = 0L;
|
||||
_end_time = 0L;
|
||||
size_t len = _usage_array_size * sizeof(MemoryUsage);
|
||||
memset(_before_gc_usage_array, 0, len);
|
||||
memset(_after_gc_usage_array, 0, len);
|
||||
for (int i = 0; i < _usage_array_size; i++) ::new (&_before_gc_usage_array[i]) MemoryUsage();
|
||||
for (int i = 0; i < _usage_array_size; i++) ::new (&_after_gc_usage_array[i]) MemoryUsage();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user