mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: Foam::name() of memory address
- returns the memory address formatted in hexadecimal, which can be useful for detailed information
This commit is contained in:
committed by
Andrew Heather
parent
3870b1d43c
commit
3c07a1bb6f
@ -2,10 +2,10 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
| Copyright (C) 2011 OpenFoam Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -41,8 +41,8 @@ using namespace Foam;
|
||||
template<class T>
|
||||
void printAddress(const UList<T>& list)
|
||||
{
|
||||
Info<< "list addr: " << uintptr_t(&list)
|
||||
<< " data addr: " << uintptr_t(list.cdata()) << nl;
|
||||
Info<< "list addr: " << name(&list)
|
||||
<< " data addr: " << name(list.cdata()) << nl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user