aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/mem.hh
Commit message (Collapse)AuthorAge
* Allow padding in transport operatorsErik Schnetter2012-11-22
| | | | | Rewrite padding infrastructure. Add padded array extents to transport operator APIs.
* CarpetLib: Remove/correct ATTRIBUTE_CONST and ATTRIBUTE_PURE declarationsErik Schnetter2012-09-11
|
* CarpetLib: Introduce gdata::allocated_memory_shapeErik Schnetter2011-12-14
| | | | | | Introduce a function gdata::allocated_memory_shape that determines from a given grid size how many grid points should be allocated. This allows adding padding to grid sizes, e.g. to improve cache performance. Use this function when checking grid sizes.
* CarpetLib: Split mem.cc into two files mem.cc and memstat.ccErik Schnetter2011-12-14
| | | | | mem.cc contains the mem class, memstat.cc the CarpetLib memory statistics.
* Import CarpetErik Schnetter2011-12-14
| | | | Ignore-this: 309b4dd613f4af2b84aa5d6743fdb6b3
* CarpetLib: Make mem<T> saferErik Schnetter2008-02-19
| | | | | | | | | | When passing in a pointer to mem<T>, also pass the size of the pointed-to memory region, so that mem<T> can check that there is enough space. Keep track of the number of allocated bytes in mempools. darcs-hash:20080219044528-dae7b-107edc6f696a35aad32ef6e58129b3281d00eb56.gz
* CarpetLib: Add function memoryof to measure size of data structuresErik Schnetter2008-02-02
| | | | | | | Add an overloaded function memoryof which measures the size in bytes of CarpetLib's data structures. darcs-hash:20080202154302-dae7b-de41c79cb04617327695fae27928c05c5d431ee8.gz
* CarpetLib: Add class mempoolErik Schnetter2007-05-26
| | | | | | | | | | | A mempool (memory pool) is a large chunk of memory. You can allocate pieces of it. In order to simplify things there is no way to free a piece again. If the mempool is destroyed, then all its memory is freed. This is dangerous: you have to make sure that no one continues to use that memory afterwards. Using a memory pool for short-lived objects can reduce memory fragmentation. darcs-hash:20070526195001-dae7b-b419df094d19b85dbf145debdf62da2dc57823af.gz
* CarpetLib: Use AT to index std::vectorErik Schnetter2007-02-03
| | | | | | | | Define a macro AT() to index into std::vector. Depending on the macro NDEBUG, AT() is defined either as at(), providing index checking, or as operator[], providing no checking. darcs-hash:20070203205854-dae7b-a1999c88c95ba12b1ee66505f712aefdd67d7e6f.gz
* CarpetLib: Introduce new class mem<T> for memory managementErik Schnetter2005-03-05
Introduce a new class mem<T> for memory management. Memory management has become sufficiently complicated to move into its own class. The class mem<T> features: 1. Allocating nelem items of type T 2. Managing contiguous regions of memory for several data<T> objects for vector groups 3. Allowing a pointer to a memory region to be passed in, which is used instead of allocating memory through new 4. Reference counting, so that the mem<T> object only goes away once the last using data<T> object does not need it any more. This makes it unnecessary to delete the first data<T> objects for a grid function group last. darcs-hash:20050305174647-891bb-e1f53adca34e5a668af96c662845cca0f259f8e6.gz