Finding Available Memory in Delphi XE2 for iOS Application

Posted on 2012-09-13
Last Modified: 2012-09-14
I haven’t had to do this for quite some time, but I think I need to trace a memory leak. I’m using Delphi XE2’s FireMonkey to create an iOS application. Years ago, I would use the TMemoryStatus object to give me feedback as to free memory like so:

  MS: TMemoryStatus;
AString:= Format(‘%12.0n’, [MS.dwAvailPhys]);

In XE2, the TMemoryStatus object appears to be no longer defined in the SysUtils unit that is used for iOS applications and so gives an unidentified error.

My question is how can I similarly query available memory to find out where my leak might be?
Question by:efz
    LVL 9

    Assisted Solution

    LVL 14

    Accepted Solution

    These links are talking about functions which displays the instant RAM usage (but in Xcode):

    Notice that even you find the equivalent function on Delphi; It won't help you much to catch those leaks since it's not going to provide any details or trace about the occurring leaks. Instead I suggest you to use Instruments (If it supports delphi projects)
    Also check Valgrind a powerful debug tool which is able to find memory leaks.

    Author Closing Comment

    My programming problem ended up not being related to a memory leak, so I didn't test the code suggested by rinfo's link.

    Certainly Programmer-x's recommendation is the ticket once things are move to Xcode.

    Please accept my sincere thanks for your time and expertise.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now