Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RAM Component
Does anyone know if there is a Delphi component that would alow me to
control how much RAM a particular application should use?

Thanks,
Ville.



Report this thread to moderator Post Follow-up to this message
Old Post
Ville Valo
03-27-04 05:21 AM


Re: RAM Component
Hello,

this this a possible code:

procedure Tfinfo.FormCreate(Sender: TObject);

var
MS: TMemoryStatus;
begin
GlobalMemoryStatus(MS);
PhysMem.Caption := FormatFloat('#,###" KB"', MS.dwTotalPhys / 1024);
FreeRes.Caption := Format('%d %%', [MS.dwMemoryLoad]);
end;

You can find more about "GlobalMemoryStatus" in win32.hlp.


Ville Valo <ville@yahoo.com> schrieb in im Newsbeitrag:
4056b6f8$1_1@news.iprimus.com.au...
> Does anyone know if there is a Delphi component that would alow me to
> control how much RAM a particular application should use?
>
> Thanks,
> Ville.
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Josef Koller
03-27-04 05:21 AM


Re: RAM Component
Thank you. I will try this.

Ville.

"Josef Koller" <koller.josef@t-online.de> wrote in message
news:c36i1u$gv9$07$1@news.t-online.com...
> Hello,
>
> this this a possible code:
>
> procedure Tfinfo.FormCreate(Sender: TObject);
>
> var
>   MS: TMemoryStatus;
> begin
>   GlobalMemoryStatus(MS);
>   PhysMem.Caption := FormatFloat('#,###" KB"', MS.dwTotalPhys / 1024);
>   FreeRes.Caption := Format('%d %%', [MS.dwMemoryLoad]);
> end;
>
> You can find more about "GlobalMemoryStatus" in win32.hlp.
>
>
> Ville Valo <ville@yahoo.com> schrieb in im Newsbeitrag:
> 4056b6f8$1_1@news.iprimus.com.au... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ville Valo
03-27-04 05:21 AM


Re: RAM Component
Actually, just quickly glancing at the code, I straight away realised you
misunderstood my question. What your code will do is just display the
physical memory and free resources, but what I want to do to be able to
assign a certain amount of memory to a particular application. Basically, I
want to be able to manipulate memory so that one application gets a certain
amount of memory, and other application get less. For example, if a user is
playing a game then they would want to be able to assign enough memory for
the game to play properly.
I hope I can get some help with this.

Thanks,
Ville.


"Ville Valo" <ville@yahoo.com> wrote in message
news:40580df2$1_1@news.iprimus.com.au...
> Thank you. I will try this.
>
> Ville.
>
> "Josef Koller" <koller.josef@t-online.de> wrote in message
> news:c36i1u$gv9$07$1@news.t-online.com... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ville Valo
03-27-04 05:21 AM


Re: RAM Component
This sounds like an OS-task to me. An application can request memory with
the OS, it will allow or deny this request.

I don't think it is possible.

Bas

"Ville Valo" <ville@yahoo.com> wrote in message
news:405810c1_1@news.iprimus.com.au...
> Actually, just quickly glancing at the code, I straight away realised you
> misunderstood my question. What your code will do is just display the
> physical memory and free resources, but what I want to do to be able to
> assign a certain amount of memory to a particular application. Basically,
I
> want to be able to manipulate memory so that one application gets a
certain
> amount of memory, and other application get less. For example, if a user
is
> playing a game then they would want to be able to assign enough memory for
> the game to play properly.
> I hope I can get some help with this.
>
> Thanks,
> Ville.
>
>
> "Ville Valo" <ville@yahoo.com> wrote in message
> news:40580df2$1_1@news.iprimus.com.au... 
to 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Bas
03-27-04 05:21 AM


Re: RAM Component
He could override the default memory manager and write a new one. The new
memory manager would keep track of how much memory each program has
allocated already and would deny the request for memoryy if a certain quota
was met. There would be a performance loss with this, however.

Another way to do it would be to keep track of memory allocations in his
program and simply stop allocating if the limit is reached. That would
complicate the code, however.

Ville Vallo, why do you need this? And what do you need it for?

--
NoRemorse
"Expect me when you see me."

"Bas" <usenet.m.p.d.o.a@wiemie.nl> wrote in message
news:40597865$0$156$6c56d894@diablo.nl.easynet.net...
> This sounds like an OS-task to me. An application can request memory with
> the OS, it will allow or deny this request.
>
> I don't think it is possible.
>
> Bas
>
> "Ville Valo" <ville@yahoo.com> wrote in message
> news:405810c1_1@news.iprimus.com.au... 
you 
Basically,
> I 
> certain 
> is 
for 
1024); 
> to 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
NoRemorse
03-27-04 05:21 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Delphi archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:07 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.