Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2099

Summary: TeeProcs checks for cond. define FASTMM but if set, does not compile
Product: VCL TeeChart Reporter: Thomas Mueller <teechart>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal CC: david
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version: RAD 2007

Description Thomas Mueller 2018-09-27 10:58:44 EDT
Unit TeeProcs, line 8170 (class function TTeeCPU.TotalMemoryAllocated) contains the following code:

  result:={$IFDEF D16}
            {$IFDEF MSWINDOWS}
            MemoryUsed;
            {$ELSE}
            0  // Posix, MACos, iOS, Android
            {$ENDIF}
          {$ELSE}
            {$IFDEF FASTMM}
            FastGetHeapStatus
            {$ELSE}
            GetHeapStatus
            {$ENDIF}.TotalAllocated;
          {$ENDIF}

(formatting changed)

If the conditional define FASTMM is set, it tries to call FastGetHeapStatus which is not available because the Unit that supposedly provides it is not in the uses list.

If not set, it calls GetHeapStatus which (at least in Delphi 2007) is marked as deprecated. The Delphi online help states:

"Note: Since GetHeapStatus is deprecated, use GetMemoryManagerState routine instead."