[Dune-devel] UGGrid system heap
Markus Blatt
markus at dr-blatt.de
Sat May 14 12:33:57 CEST 2016
Hi,
I came across the following weird situation:
UG uses the define UG_USE_SYSTEM_HEAP in its header ug/heaps.h which
is included in quite a few other headers.
$ cat ug/heaps
[.. snip ... ]
#if UG_USE_SYSTEM_HEAP
#include <vector>
#endif
[... snip ...]
typedef struct {
enum HeapType type;
MEM size;
MEM used;
MEM freelistmem;
struct block *heapptr;
INT topStackPtr,bottomStackPtr;
MEM topStack[MARK_STACK_SIZE];
MEM bottomStack[MARK_STACK_SIZE];
INT SizeOfFreeObjects[MAXFREEOBJECTS];
void *freeObjects[MAXFREEOBJECTS];
#ifdef Debug
INT objcount[MAXFREEOBJECTS];
#endif
#if UG_USE_SYSTEM_HEAP
/* This is used only if UG_USE_SYSTEM_HEAP is set, but I don't want the
* #ifdef in an installed header, hence the data member is there all the time. */
std::vector<void*> markedMemory[MARK_STACK_SIZE];
#endif
} HEAP;
[...]
Yet, DUNE never defines UG_USE_SYSTEM_HEAP even though UG might have
done it when it was compiled. I am a bit nervous about this. Can we
really be sure that DUNE never directly calls a function using the
HEAP or should be just define UG_USE_SYSTEM_HEAP and be on the safe
side?
Markus
--
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20160514/233c7fb6/attachment.sig>
More information about the Dune-devel
mailing list