Solved

memory avalible

Posted on 1998-09-06
9
170 Views
Last Modified: 2010-04-06
hi
in my program i"m loading lots of data to the memory
how can i know how much memory avalible do i have (during run-time) ...
10x in advance
asi
0
Comment
Question by:asi
  • 6
  • 2
9 Comments
 
LVL 5

Accepted Solution

by:
ronit051397 earned 30 total points
ID: 1338795
procedure TForm1.Button1Click(Sender: TObject);
var  FVer: TOSVERSIONINFO;
     MS: TMemoryStatus;
begin
    GlobalMemoryStatus(MS);
    showmessage('Physical memory available: '+FormatFloat('#,###" KB"', MS.dwAvailPhys/1024));
end;

0
 
LVL 2

Expert Comment

by:kjteng
ID: 1338796
For delphi 1 use MemAvail and MaxAvail function
0
 

Author Comment

by:asi
ID: 1338797
hi


first of al l i"m using delphi3
second i tried you answer and it give me according to your parameters (MS.dwAvailPhys)
0.
i also tried to use some other parameter from the TOSVERSIONINFO structure and some how
b4 the data upload and after i"m reciving the same answers  ...

have any idea ?
10x in advance
asi
b_asi@inter.net.il
0
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
LVL 5

Expert Comment

by:ronit051397
ID: 1338798
I have tested it on NT4. You work on 95?
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1338799
I have tested it on NT4. You work on 95?
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1338800
In C:\Program Files\Borland\Delphi 3\Demos\RICHEDIT\Richedit.dpr
there is an example in the About Box.
I have tested it on 95 and the dwTotalPhys parameter showed the correct value.
0
 

Author Comment

by:asi
ID: 1338801
Take a look at that Demo

even if u fill the editor  with 100000000 lines
the memory used (at the about sub menu)  b4 and After is the same.
its not logic ....
Asi
maybe its a differnt memory location/part ?

0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1338802
Look at the following codes, they do the same:
http://www.borland.co.uk/devsupport/delphi/ti_list/TI3231.html
http://www.chami.com/tips/delphi/122496D.html

I have tried it and after closing some windows, available memory changed.
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1338803
Notice that dwAvailPhys shows the amount of Physical memory available in your computer so that if you "finished" your Physical memory and start to use the virtual memory this parameter will show 0.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi Dbf export problem to a Visual Foxpro application 6 191
Delphi application Soap connection 5 106
LAN or WAN ? 11 92
RESTRequest Parameter 4 32
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 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