Reduce size of AllocationInfo struct to 64 bytes ( was 72 ) (#2771)

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
Artur K
2021-08-09 19:05:55 +02:00
committed by GitHub
parent 12579e5d2e
commit fb3195d996
@@ -27,11 +27,10 @@ namespace AZ
struct AllocationInfo
{
size_t m_byteSize{};
unsigned int m_alignment{};
const char* m_name{};
const char* m_fileName{};
int m_lineNum{};
unsigned int m_alignment{};
void* m_namesBlock{}; ///< Memory block if m_name and m_fileName have been allocated specifically for this allocation record
size_t m_namesBlockSize{};
@@ -41,7 +40,7 @@ namespace AZ
};
// We use OSAllocator which uses system calls to allocate memory, they are not recorded or tracked!
typedef AZStd::unordered_map<void*, AllocationInfo, AZStd::hash<void*>, AZStd::equal_to<void*>, OSStdAllocator> AllocationRecordsType;
using AllocationRecordsType = AZStd::unordered_map<void*, AllocationInfo, AZStd::hash<void*>, AZStd::equal_to<void*>, OSStdAllocator>;
/**
* Records enumeration callback
@@ -50,7 +49,7 @@ namespace AZ
* \param unsigned char number of stack records/levels, if AllocationInfo::m_stackFrames != NULL.
* \returns true if you want to continue traverse of the records and false if you want to stop.
*/
typedef AZStd::function<bool (void*, const AllocationInfo&, unsigned char)> AllocationInfoCBType;
using AllocationInfoCBType = AZStd::function<bool (void*, const AllocationInfo&, unsigned char)>;
/**
* Example of records enumeration callback.
*/