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 - TeeProcs checks for cond. define FASTMM but if set, does not compile
Summary: TeeProcs checks for cond. define FASTMM but if set, does not compile
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-27 10:58 EDT by Thomas Mueller
Modified: 2023-03-17 08:39 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version: RAD 2007


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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."