Directory Core/Malloc/

Total Files:
9
Deleted Files:
2
Lines of Code:
2446

[root]/Core/Malloc

Lines of Code

Core/Malloc/ Lines of Code

Developers

Author Changes Lines of Code Lines per Change
Totals 52 (100.0%) 945 (100.0%) 18.1
dav 26 (50.0%) 692 (73.2%) 26.6
luitjens 16 (30.8%) 241 (25.5%) 15.0
jas 10 (19.2%) 12 (1.3%) 1.2

Most Recent Commits

dav 2008-08-15 16:46 Rev.: 41914

Fixes to allow Uintah to build using the PGI compiler:

M configure
M configure.ac

- Figure out size of 'long long' so that Endian.cc swapbytes() can be
set correctly... perhaps a bit of overkill, but...
- PGI compilers don't support -Wall, so don't use it.
- Better messages when determining dependency generation flag. Fix
grep for ":" as it sometimes is " :". See below (configVars.mk.in).
- pgf77 needs -lrt to link.

M configVars.mk.in

- ECHO should not be "echo -n" (no newline)... so named it more appropriately.
- Many compilers don't create dependency files (.d) with exactly "name.o : name.cc".
Then may use "name.o:name.cc". So don't use the ":" in the sed. This should
never cause a problem because of the "^".
- Added the dependency mode of: 'modify_and_move'. PGI compiler creates an invalid
.d file in the wrong place, so we have to fix it and move it.
- NOTE: the F77 dependency flag is currently (historically) just a copy of the CXX
flag... this has worked in the past and still works for everything but pgf77.
Soon (but not in this update) I will fix configure to do this correctly.

M StandAlone/regression/sub.mk
M Packages/Uintah/StandAlone/tools/compare_mms/sub.mk
M Packages/Uintah/StandAlone/tools/radiusMaker/sub.mk

- Need BLAS_LIBRARY to link... at least on Ranger using PGI.
- Please indent... it really does make it easier to read.

M Core/Malloc/Allocator.cc

Moved variable into the #if section that it is used in. Avoids compiler warning.

M Core/Util/Endian.cc
A Core/Util/testEndian.h.in
D Core/Util/Endian.h

- pgcc is requiring the swapbytes() for 'long long'... So add it
in. Since 'long long' size can be different on different machines,
use overkill method with configure figuring out size and setting it
for us.
- Moved Endian.h to testEndian.h.in to allow configure to modify it.
- Indented.

M Core/Util/sub.mk
M Packages/Uintah/Core/Grid/Variables/sub.mk

Untabified.

M Core/Util/Socket.cc

Fix compiler warning and possible 'random' error.

M Core/Math/MiscMath.cc

Fix PGI compiler issue.

M Packages/Uintah/CCA/Components/DataArchiver/DataArchiver.cc
M Packages/Uintah/CCA/Components/Schedulers/SchedulerCommon.cc

#include <time.h> is required for time functions.

M Packages/Uintah/CCA/Components/ICE/EOS/IdealGas.cc
M Packages/Uintah/CCA/Components/ICE/CustomBCs/sine.h
M Packages/Uintah/CCA/Components/ICE/CustomBCs/MMS_BCs.cc
M Packages/Uintah/CCA/Components/ICE/CustomBCs/microSlipBCs.cc
M Packages/Uintah/CCA/Components/ICE/BoundaryCond.cc

- Removed a bunch of definitions of "iter". (vector<IntVector>::const_iterator)...
probably a leftover from the iterator update a while back. In some cases,
renamed an interior (for loop) iterator from "iter" to "cIter" so that the
code would be a little more clear as to which iterator was being used
inside the inner for loop. Also, define some iterators in the for loop,
instead of above the loop. (for( vector::iterator iter...))

M Packages/Uintah/CCA/Components/ICE/AMRICE.h
M Packages/Uintah/Core/Grid/Variables/GridVariable.h
M Packages/Uintah/Core/Grid/Variables/GridVariableBase.h

Fix compiler warning about hidden parent class function.

M Packages/Uintah/CCA/Components/Arches/ExtraScalarSolver.h

Fix compiler warning about ineffectual use of a const return type. Eg:

const int doSomething() { return 1; }

doesn't mean anything... it doesn't make sense for the returned int to
be const. Should just be:

int doSomething() { return 1; }

M Packages/Uintah/CCA/Ports/SFC.h

Fix problem with nested comments. Don't use /* ... */ over many lines. Use #if 0.

M Packages/Uintah/StandAlone/tools/uda2nrrd/particles.cc

Comment about invalid code.

M Packages/Uintah/StandAlone/tools/puda/varsummary.cc

PGI compiler needs Min/Max defined.

M Packages/Uintah/StandAlone/tools/extractors/partextract.cc

#include <stdlib.h> for strtoll... Add hack to force (older (verion
7.1-2)) pgCC to allow strtoll.

M Packages/Uintah/Core/Grid/Patch.h
M Packages/Uintah/Core/Grid/AMR.h

Hack to remove PGI compiler warnings about unreachable code.

M Packages/Uintah/Core/Grid/Grid.h

Use white space... it is also your friend. Seriously (on a related
note ;) can someone tell me why they think "x=3;" is better than "x = 3;"?

M Packages/Uintah/Core/Grid/Variables/ReductionVariable_special.cc

Wow, this is an ugly file... Had to add some (templated) functions
that the PGI compiler was requiring.

M Packages/Uintah/Core/Grid/Variables/ComputeSet.h

Don't seem to need to #include the .cc file (for the templates) with
PGI anymore... at least not on Ranger using pgCC version 7.1-2.

M Packages/Uintah/Core/Grid/Variables/VarTypes.h

Needs the 'long long' var type.

M Packages/Uintah/Core/Grid/Variables/ComputeSet_special.cc

More use of white space, indentation, etc.

M Packages/Uintah/Core/DataArchive/DataArchive.cc

Added {} around what looks like a necessary block of code... strange
that this didn't cause hangs, etc in the code. Perhaps this section
of code isn't used that often? Hope the RT doesn't gripe
tomorrow... it's not my fault!

M Packages/Uintah/Core/Disclosure/TypeUtils.h
M Packages/Uintah/Core/Disclosure/TypeUtils.cc

Added 'long long' function. Organized the code a tad bit to make it
easier to see which functions (for which types) are defined.

M Packages/Uintah/testprograms/sub.mk
M Packages/Uintah/testprograms/PatchBVH/sub.mk
M Packages/Uintah/testprograms/TestFastMatrix/sub.mk
M Packages/Uintah/testprograms/BNRRegridder/sub.mk
M Packages/Uintah/testprograms/IteratorTest/sub.mk

Untabify. Clean up. Removed double definition of LIBS. Requires
BLAS_LIBRARY to link.

M Packages/Uintah/tools/BlasLapackTests/test_blas.c

Ranger's version of testcase... not sure I should have checked it
in... Probably need to have both with the #if separating them.

M Packages/Uintah/Dataflow/Modules/Selectors/ParticleFieldExtractor.h

Fix compiler warning about hidden function (update_progress).

M Packages/Uintah/Dataflow/Modules/Selectors/ParticleFieldExtractor.cc

Fix includes (better ordering). Fix (hack) PGI problem with finding atoll.

M Packages/Uintah/Dataflow/Modules/Selectors/FieldExtractor.h

More white space. Remove unused var. Move common code to above 'if'.

3 lines of code changed in 2 files:

  • Core/Malloc: Allocator.cc (+3 -2)
luitjens 2008-08-04 23:01 Rev.: 41824

Don't allow mem usage to wrap below zero. This causes allocation to appear near max usage. I'm unsure what situtaions cause the memory freed to be greater than the memory allocated.


4 lines of code changed in 1 file:

  • Core/Malloc: Allocator.cc (+4)
luitjens 2008-08-04 16:49 Rev.: 41818

missed a few typecasts

2 lines of code changed in 1 file:

  • Core/Malloc: Allocator.cc (+2 -2)
luitjens 2008-08-04 13:06 Rev.: 41811

typecast size_t variables to the proper int to ensure that printf plays nice.


41 lines of code changed in 1 file:

  • Core/Malloc: Allocator.cc (+41 -37)
jas 2008-07-19 05:08 Rev.: 41624

Add missing ';'.

0 lines of code changed in 2 files:

  • Core/Malloc: new.cc (new)
dav 2008-07-18 17:44 Rev.: 41609

Clean up indentation.

86 lines of code changed in 9 files:

  • Core/Malloc: AllocOS.cc (+20 -13), AllocPriv.h (new), Allocator.h (new), malloc.cc (new), new.cc (+2 -2)
luitjens 2008-07-18 13:25 Rev.: 41590

Implemented the corresponding versions for delete. This should stop the warnings we were getting about no corresponding operator if an exception is thrown.

32 lines of code changed in 1 file:

  • Core/Malloc: new.cc (+32)
luitjens 2008-07-15 11:23 Rev.: 41521

Tweaks to MallocTrace

22 lines of code changed in 4 files:

  • Core/Malloc: AllocOS.cc (+6 -1), AllocPriv.h (+6), malloc.cc (+8 -6), new.cc (+2 -2)
luitjens 2008-07-14 18:39 Rev.: 41515

Added MallocTrace support to Uintah, cleaned up mpi includes, removed SCI_MALLOC_TRACE functionality.

Currently building with MallocTrace is only supported within Uintah.

48 lines of code changed in 5 files:

  • Core/Malloc: Allocator.h (+30 -6), Trace.cc (del), Trace.h (del), malloc.cc (+9), new.cc (+9)
jas 2008-07-07 20:07 Rev.: 41434

Use the proper c++ standard for include files for the C inlude files, i.e.
<stdio.h> --> <cstdio>
<math.h> --> <cmath>

Tested on g++ 4.2 and 4.3 compilers.

12 lines of code changed in 8 files:

  • Core/Malloc: AllocOS.cc (+3 -3), AllocOS.h (+1 -1), AllocPriv.h (+1 -1), Allocator.cc (+3 -3), Allocator.h (+1 -1), Trace.cc (new 2), malloc.cc (+1 -1)
luitjens 2008-05-06 11:00 Rev.: 40926

Changed the printf's to print an unsigned number instead of a signed.

2 lines of code changed in 1 file:

  • Core/Malloc: Allocator.cc (+2 -2)
dav 2008-04-02 17:13 Rev.: 40640

malloc.cc updates for memory initialization

11 lines of code changed in 3 files:

  • Core/Malloc: malloc.cc (+3 -2), testmem_init.h.in (+8 -5)
dav 2008-04-02 16:56 Rev.: 40639

Forgot to commit configure controlled .h file for memory initialization code.

19 lines of code changed in 1 file:

  • Core/Malloc: testmem_init.h.in (+19)
dav 2008-04-02 16:54 Rev.: 40638


M configure
M configure.ac

Added a configure flag (--enable-memory-initialization[=8_bit_number])
that turns on the memory initialization code that Justin wrote. If
8_bit_number is not specified, it defaults to 127. If the flag is not
specified, then memory initialization is turned off. This should only
effect new.cc, so via configure, you can toggle it back and forth
without having to worry about compiling lots of files.

M Core/Malloc/new.cc

Removed Todd's (bad :P) influence on Justin and renamed the flags to
be something meaningful. ;)

18 lines of code changed in 1 file:

  • Core/Malloc: new.cc (+18 -16)
luitjens 2008-04-02 11:40 Rev.: 40630

Added the ability to initialize variables to "bad" numbers. To turn
this on add the following lines to "include/sci_defs/malloc_defs.h"
within your build directory.

//========================================
#define INITIALIZE_EVIL
#define EVIL_NUM 127
//========================================



Evil num specifies the bit pattern for each allocated byte.

If you set EIL_NUM to 127 both floats and ints will be initalized to
very large numbers. If you set to 255 you will initalize floating point
numbers to nan and signed integers to -1.

This will provide a mechinism to help tracking down uninitialized
variables. This should work with both SCI_MALLOC on and off.

90 lines of code changed in 2 files:

  • Core/Malloc: malloc.cc (+12 -7), new.cc (+78 -34)
dav 2008-01-03 17:14 Rev.: 39796

M configure
M configure.ac
M configVars.mk.in
M Core/Malloc/sub.mk

Only compile Trace.cc if malloc tracing is turned on.

M Core/Malloc/Trace.cc
Put AllocatorSetDefaultTagMalloc() func in SCIRun namespace.

M Core/Malloc/malloc.cc

Don't compile Allocator version of AllocatorSetDefaultTagMalloc if malloc tracing is on.

M Core/Util/sci_system.cc

Fix namespace problem.



24 lines of code changed in 4 files:

  • Core/Malloc: Trace.cc (+2 -2), malloc.cc (+19 -18), sub.mk (+3 -1)
dav 2008-01-02 16:51 Rev.: 39777

Don't compile Trace.cc under OSX.

5 lines of code changed in 1 file:

  • Core/Malloc: sub.mk (+5 -2)
dav 2008-01-02 16:13 Rev.: 39775


This commit adds the SCI_MALLOC_TRACE functionality (found in the
Core/Malloc/Trace.h file (though accessed through
Core/Malloc/Allocator.h). The Malloc tracing will create a file and
record every malloc/free in it. (This will capture the news/deletes
too.) By using scinew, the name of the file and line number of each
new() will be recorded. (Note, until a file name to save information
to is specified, mallocs will be traced via stdout. You can only use
one of malloc trace or sci malloc, but not both at the same time.

M configure.ac
M configure

Use "--enable-sci-malloc-trace" on the configure line to turn on
malloc tracing.

M include/sci_defs/malloc_testdefs.h.in

Contains the #define for malloc trace if enabled via confiure.

A Core/Malloc/Trace.cc
A Core/Malloc/Trace.h

Implements the tracing functionality... Note, you should #include
Allocator.h and not Trace.h.

M Core/Malloc/sub.mk

Compile Trace.cc.

M Core/Malloc/Allocator.h
M Core/Malloc/Allocator.cc

Indent some # stuff. Don't create Allocator stuff in SCI Malloc is
off or SCI Trace is on.

M Core/Util/sci_system.cc

Indent # stuff. Only lock/unlock allocator if using SCI Malloc.

M Core/Geometry/BBox.h

Be specific about #undef of min and max instead of assuming they both
are always exist together. (They probably do, but...)

M Core/GuiInterface/MemStats.cc

Fix to only use parts of code if SCI Malloc is on.

M testprograms/Malloc/test14.cc

Test 14 doesn't do anything currently, so printed out a message to let the user know.

M Packages/Uintah/Dataflow/Modules/Visualization/SubFieldHistogram.cc

Removed "using SCIRun::Allocator" (etc) as it wasn't being used.

M Packages/Uintah/CCA/Components/SimulationController/AMRSimulationController.cc
M Packages/Uintah/CCA/Components/Schedulers/SchedulerCommon.cc
M Packages/Uintah/Core/Parallel/Parallel.cc

Only use Allocator functions if SCI Malloc on.

M Packages/Uintah/CCA/Components/ICE/ICE.cc

Turned off setting of unused variable "Time".

M Packages/Uintah/Core/DataArchive/DataArchive.cc

Don't use Allocator functions if SCI Malloc is off... Fixed some initialization of variables.

M Packages/Uintah/StandAlone/sus.cc

Added sample of turning on malloc trace file.


526 lines of code changed in 5 files:

  • Core/Malloc: Allocator.cc (+90 -84), Allocator.h (+40 -21), Trace.cc (+231), Trace.h (new 160), sub.mk (+5 -2)
Generated by StatSVN 0.4.0