"Savoy, Elizabeth S" wrote:
> Thanks for the input. I have one question - what is the meaning /
> significance of the LOG_NEW and LOG_DEL statements? I've seen these in
> message class definitions in the constructors and destructors, but I don't
> know why they are used.
>
> Thanks
> Beth Savoy
> Corning, Inc
> (607) 974-8813
>
LOG_DEL and LOG_NEW are macros for logging the dynamic allocation and
deallocation of memory to make debugging easier. I did not use ist and to be
honest I don't know how to do it. But I think it does not hurt to include it in
the code. You may want to look at: $PTOLEMY/src/kernel/logNew.h:
---------------------------------------------------------
Macros for use with the logging memory allocator. Use LOG_NEW
and LOG_DEL before calls to new and delete, respectively, in .cc
files. Use INC_LOG_NEW and INC_LOG_DEL in .h files.
If the symbol MEMORYLOG is not defined, these macros are dummies.
It is possible to do a "mixed" version of Ptolemy: some files compiled
with this symbol on, others not. If you do this, and logNew.cc was
built with logging on, then all allocation from files built with logging
off will be reported as being file "Unknown", line 0.
If MEMORYLOG is defined, all files must begin with a line of the form
static const char file_id[] = "this-file-name.cc";
before any include files are included.
----------------------------------------------------------
Kai
______________________________________________________________________________
Kai Below
TU Hamburg-Harburg, Digital Communication Systems
Denickestr. 17, R. 3009, D-21071 Hamburg, G E R M A N Y
Tel: +4940 428 78 - 3351, Fax: +4940 428 78 - 2941
http://www.tu-harburg.de/~et6kb/ (PGP-key available)
______________________________________________________________________________
----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list. Please send administrative
mail for this list to: [EMAIL PROTECTED]