PR_fprintf(globals.mRequest.mFD, "<tr><td align=left>Heap Operation Seconds:</td><td align=right>" ST_MICROVAL_FORMAT "</td></tr>\n", ST_MICROVAL_PRINTABLE(heapCost));
int displayAllocationDetails(STAllocation* aAllocation){    int retval = 0;    if(NULL != aAllocation)    {        PRUint32 traverse = 0;        PRUint32 bytesize = byteSize(aAllocation);        PRUint32 timeval = aAllocation->mMaxTimeval - aAllocation->mMinTimeval;        PRUint64 weight64 = LL_INIT(0, 0);        PRUint32 cacheval = 0;        int displayRes = 0;        LL_MUL(weight64, (PRUint64)bytesize, (PRUint64)timeval);        PR_fprintf(globals.mRequest.mFD, "Allocation %u Details:<p>\n", aAllocation->mRunIndex);        PR_fprintf(globals.mRequest.mFD, "<table>\n");        PR_fprintf(globals.mRequest.mFD, "<tr><td align=left>Final Size:</td><td align=right>%u</td></tr>\n", bytesize);        PR_fprintf(globals.mRequest.mFD, "<tr><td align=left>Lifespan Seconds:</td><td align=right>" ST_TIMEVAL_FORMAT "</td></tr>\n", ST_TIMEVAL_PRINTABLE(timeval));        PR_fprintf(globals.mRequest.mFD, "<tr><td align=left>Weight:</td><td align=right>%llu</td></tr>\n", weight64);        PR_fprintf(globals.mRequest.mFD, "</table><p>\n");        /*        ** The events.        */        PR_fprintf(globals.mRequest.mFD, "%u Life Event(s):<br>\n", aAllocation->mEventCount);        PR_fprintf(globals.mRequest.mFD, "<table border=1>\n");        PR_fprintf(globals.mRequest.mFD, "<tr>\n");        PR_fprintf(globals.mRequest.mFD, "<td></td>\n");        PR_fprintf(globals.mRequest.mFD, "<td><b>Operation</b></td>\n");        PR_fprintf(globals.mRequest.mFD, "<td><b>Size</b></td>\n");        PR_fprintf(globals.mRequest.mFD, "<td><b>Seconds</b></td>\n");        PR_fprintf(globals.mRequest.mFD, "<td></td>\n");        PR_fprintf(globals.mRequest.mFD, "</tr>\n");        for(traverse = 0; traverse < aAllocation->mEventCount && traverse < globals.mOptions.mListItemMax; traverse++)        {            PR_fprintf(globals.mRequest.mFD, "<tr>\n");            /*            ** count.            */            PR_fprintf(globals.mRequest.mFD, "<td valign=top align=right>%u.</td>\n", traverse + 1);            /*            ** Operation.            */            PR_fprintf(globals.mRequest.mFD, "<td valign=top>");            switch(aAllocation->mEvents[traverse].mEventType)            {                case TM_EVENT_CALLOC:                    PR_fprintf(globals.mRequest.mFD, "calloc");                    break;                case TM_EVENT_FREE:                    PR_fprintf(globals.mRequest.mFD, "free");                    break;                case TM_EVENT_MALLOC:                    PR_fprintf(globals.mRequest.mFD, "malloc");                    break;                case TM_EVENT_REALLOC:                    PR_fprintf(globals.mRequest.mFD, "realloc");                    break;                default:                    retval = __LINE__;                    REPORT_ERROR(__LINE__, displayAllocationDetails);                    break;            }            PR_fprintf(globals.mRequest.mFD, "</td>");            /*            ** Size.            */            PR_fprintf(globals.mRequest.mFD, "<td valign=top align=right>%u</td>\n", aAllocation->mEvents[traverse].mHeapSize);            /*            ** Timeval.            */            cacheval = aAllocation->mEvents[traverse].mTimeval - globals.mMinTimeval;            PR_fprintf(globals.mRequest.mFD, "<td valign=top align=right>" ST_TIMEVAL_FORMAT "</td>\n", ST_TIMEVAL_PRINTABLE(cacheval));            /*            ** Callsite backtrace.            ** Only relevant backtrace is for event 0 for now until            **  trace-malloc outputs proper callsites for all others.            */            PR_fprintf(globals.mRequest.mFD, "<td valign=top>\n");            if(0 == traverse)            {                displayRes = displayCallsites(aAllocation->mEvents[traverse].mCallsite, ST_FOLLOW_PARENTS, 0, __LINE__);                if(0 != displayRes)                {                    retval = __LINE__;                    REPORT_ERROR(__LINE__, displayCallsite);                }            }            PR_fprintf(globals.mRequest.mFD, "</td>\n");            PR_fprintf(globals.mRequest.mFD, "</tr>\n");        }        PR_fprintf(globals.mRequest.mFD, "</table><p>\n");    }    else    {        retval = __LINE__;        REPORT_ERROR(__LINE__, displayAllocationDetails);    }    return retval;}