mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8292073: NMT: remove unused constructor parameter from MallocHeader
Reviewed-by: zgu
This commit is contained in:
parent
cfd44bb2cd
commit
b6ff8fa307
3 changed files with 3 additions and 3 deletions
|
@ -116,7 +116,7 @@ class MallocHeader {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
inline MallocHeader(size_t size, MEMFLAGS flags, const NativeCallStack& stack, uint32_t mst_marker);
|
inline MallocHeader(size_t size, MEMFLAGS flags, uint32_t mst_marker);
|
||||||
|
|
||||||
inline size_t size() const { return _size; }
|
inline size_t size() const { return _size; }
|
||||||
inline MEMFLAGS flags() const { return (MEMFLAGS)_flags; }
|
inline MEMFLAGS flags() const { return (MEMFLAGS)_flags; }
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "utilities/nativeCallStack.hpp"
|
#include "utilities/nativeCallStack.hpp"
|
||||||
|
|
||||||
inline MallocHeader::MallocHeader(size_t size, MEMFLAGS flags, const NativeCallStack& stack, uint32_t mst_marker)
|
inline MallocHeader::MallocHeader(size_t size, MEMFLAGS flags, uint32_t mst_marker)
|
||||||
: _size(size), _mst_marker(mst_marker), _flags(NMTUtil::flag_to_index(flags)),
|
: _size(size), _mst_marker(mst_marker), _flags(NMTUtil::flag_to_index(flags)),
|
||||||
_unused(0), _canary(_header_canary_life_mark)
|
_unused(0), _canary(_header_canary_life_mark)
|
||||||
{
|
{
|
||||||
|
|
|
@ -174,7 +174,7 @@ void* MallocTracker::record_malloc(void* malloc_base, size_t size, MEMFLAGS flag
|
||||||
}
|
}
|
||||||
|
|
||||||
// Uses placement global new operator to initialize malloc header
|
// Uses placement global new operator to initialize malloc header
|
||||||
MallocHeader* const header = ::new (malloc_base)MallocHeader(size, flags, stack, mst_marker);
|
MallocHeader* const header = ::new (malloc_base)MallocHeader(size, flags, mst_marker);
|
||||||
void* const memblock = (void*)((char*)malloc_base + sizeof(MallocHeader));
|
void* const memblock = (void*)((char*)malloc_base + sizeof(MallocHeader));
|
||||||
|
|
||||||
// The alignment check: 8 bytes alignment for 32 bit systems.
|
// The alignment check: 8 bytes alignment for 32 bit systems.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue