[Xitami] memtrace
Ewen McNeill
xitami@lists.xitami.org
Fri, 02 Nov 2001 13:26:54 +1300
In message <E15zRVP-0002Os-00@entropy.ucam.org>, "Simon McVittie" writes:
>> >It should never be generated; the fact that it has means something broke.
>> >I'm sure it shouldn't be as large as 8GB though... how long had Xitami been
>> >running for?
>>
>> In fact, only 5 hours. Hard to believe such a writing rate.
>
>From more source code reading, it's actually all written on exit, but the file
>is a record of *all* the memory Xitami allocated and deallocated (which will
>probably only be a few bytes at a time in some places).
The file is written on exit, if there is any memory that was allocated
but has not been freed. It lists only the memory that was allocated,
but not freed, including where it was allocated.
To have written an 8GB file, the pointers through the memory allocated
must have got themselves into a nasty loop somewhere, so you'll probably
find the 8GB file contains a _lot_ of repeats.
As to whether it should be enabled in a production version; that's a
matter for opinion. We generally try for "zero leaks" (because that's a
whole lot better if you're leaving something running for a long time),
and thus in theory it shouldn't matter if it's enabled in a production
version.
Ewen
--
Ewen McNeill, Technical Consultant, iMatix Corporation www.imatix.com