old_code/mmgr.cpp
// ---------------------------------------------------------------------------------------------------------------------------------
// -DOC- Unused RAM calculation routines. Use these to determine how much of your RAM is unused (in bytes)
// ---------------------------------------------------------------------------------------------------------------------------------

DOC- Unused RAM calculation routines. Use these to determine how much of your RAM is unused (in bytes)
DOC - Unused RAM calculation routines . Use these to determine how much of your RAM is unused ( in bytes )
size_t m_calcUnused(const sAllocUnit *allocUnit)
{
    const size_t *ptr = (const size_t *) allocUnit->reportedAddress;
    size_t  count = 0;
    for (size_t i = 0; i < allocUnit->reportedSize; i += sizeof(long), ptr++)
    {
        if (*ptr == unusedPattern) count += sizeof(long);
    }
    return count;
}
size_t m_calcUnused ( const sAllocUnit * allocUnit ) { const size_t * ptr = ( const size_t * ) allocUnit -> reportedAddress ; size_t count = 0 ; for ( size_t i = 0 ; i < allocUnit -> reportedSize ; i += sizeof ( long ) , ptr ++ ) { if ( * ptr == unusedPattern ) count += sizeof ( long ) ; } return count ; }
DOC- Unused RAM calculation routines.
DOC - Unused RAM calculation routines .