Starting from an initial buffer size of 256 it is incremented in steps
of 256 upto the maximum of 4096 as required.
Based on patch provided by Bruno Santos
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1944
This malloc overrides the one provided by GLIBC and calls mallocNan
which initializes the allocated block of memory to NaN if enabled by the
FOAM_SETNAN environment variable.
in particular to pick-up the DebugSwitches from system/controlDict at
global construction time.
Disadvantage is that system/controlDict is only picked-up if the
OpenFOAM application is executed IN the case directory. The directory
provided by the -case option is not yet known as the arguments have not
yet been parsed.
To compile with 64bit labels set
WM_LABEL_SIZE=64
in ~/OpenFOAM/dev/prefs.sh
source ~/.bashrc
then Allwmake in OpenFOAM-dev.
This will build into for example OpenFOAM-dev/platforms/linux64ClangDPInt64Opt
If WM_LABEL_SIZE is unset or set to 32:
WM_LABEL_SIZE=32
the build would be placed into OpenFOAM-dev/platforms/linux64ClangDPInt32Opt
Thus both 32bit and 64bit label builds can coexist without problem.