Click here to Skip to main content
15,908,020 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to activate F1 to F12 keys Pin
leppie17-Dec-05 21:50
leppie17-Dec-05 21:50 
GeneralRe: How to activate F1 to F12 keys Pin
ayuba asia18-Dec-05 15:02
ayuba asia18-Dec-05 15:02 
QuestionSendMessage stops my App Pin
sirlantis17-Dec-05 14:27
sirlantis17-Dec-05 14:27 
AnswerRe: SendMessage stops my App Pin
Jared Parsons17-Dec-05 20:36
Jared Parsons17-Dec-05 20:36 
QuestionSystem.ManagementObjectSearcher ' s constructor by sql clause... Pin
Developer_117-Dec-05 13:53
Developer_117-Dec-05 13:53 
AnswerRe: System.ManagementObjectSearcher ' s constructor by sql clause... Pin
Dave Kreskowiak17-Dec-05 17:36
mveDave Kreskowiak17-Dec-05 17:36 
QuestionMemory management - Free a process's memory Pin
orenmh17-Dec-05 13:29
orenmh17-Dec-05 13:29 
AnswerRe: Memory management - Free a process's memory Pin
Colin Angus Mackay17-Dec-05 14:20
Colin Angus Mackay17-Dec-05 14:20 
orenmh wrote:
Programs like FreeRam or cacheman free the service memory (which is running in an exe process) with no problem


I've read reports of these programs. They are supposedly a sham and don't really do anything other than trick you into thinking that is has done something useful. Most of the time they make the overall situation worse.

An external process that has no knowledge of an application cannot force it to free RAM, it can only trick it into paging memory in RAM to the swap file. This means that more RAM is freed up, but slows down already running applications because they have to be swapped back to main memory in order to run at some later point.


orenmh wrote:
I want to be able to free the process's memory using my own code. How do I do that?


If you have the source code of the service, then you can re-write it to be more memory efficient.


orenmh wrote:
What API are involved and how do I use them?


DisplaceExistingProgramsToVirtualMemory()
{
    byte[] bigBlockOfMemory = new byte[1048576*512]; // Allocate half a gigabyte.
}


That ought to do it. If you have a lot of memory you might want to increase the amount allocated.




My: Blog | Photos

"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious


QuestionBit fields in C# Pin
Drot17-Dec-05 7:56
Drot17-Dec-05 7:56 
AnswerRe: Bit fields in C# Pin
Jared Parsons17-Dec-05 10:51
Jared Parsons17-Dec-05 10:51 
AnswerRe: Bit fields in C# Pin
leppie17-Dec-05 21:56
leppie17-Dec-05 21:56 
AnswerRe: Bit fields in C# Pin
tarasn19-Dec-05 23:24
tarasn19-Dec-05 23:24 
QuestionAdd data to an ArrayList Pin
Duif17-Dec-05 6:08
Duif17-Dec-05 6:08 
AnswerRe: Add data to an ArrayList Pin
Robert Rohde17-Dec-05 6:55
Robert Rohde17-Dec-05 6:55 
GeneralRe: Add data to an ArrayList Pin
Duif17-Dec-05 7:03
Duif17-Dec-05 7:03 
GeneralRe: Add data to an ArrayList Pin
Duif17-Dec-05 7:59
Duif17-Dec-05 7:59 
GeneralRe: Add data to an ArrayList Pin
Duif17-Dec-05 9:36
Duif17-Dec-05 9:36 
GeneralRe: Add data to an ArrayList Pin
Robert Rohde17-Dec-05 21:06
Robert Rohde17-Dec-05 21:06 
QuestionListView question Pin
QzRz17-Dec-05 5:33
QzRz17-Dec-05 5:33 
AnswerRe: ListView question Pin
cmaissan17-Dec-05 8:43
cmaissan17-Dec-05 8:43 
GeneralRe: ListView question Pin
QzRz17-Dec-05 9:22
QzRz17-Dec-05 9:22 
QuestionPrint the contents of an entire form Pin
rikkemus17-Dec-05 5:12
rikkemus17-Dec-05 5:12 
AnswerRe: Print the contents of an entire form Pin
Robert Rohde17-Dec-05 5:50
Robert Rohde17-Dec-05 5:50 
GeneralRe: Print the contents of an entire form Pin
rikkemus17-Dec-05 9:20
rikkemus17-Dec-05 9:20 
GeneralRe: Print the contents of an entire form Pin
Robert Rohde17-Dec-05 21:13
Robert Rohde17-Dec-05 21:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.