Home All Groups Group Topic Archive Search About
Author
1 Jul 2005 9:10 PM
John
I have a 325k VB.Net app that when loaded uses about 25Meg. There's SQL
calls, etc. but how can it take up so much space and how can I reduce the
memory footprint? John

Author
1 Jul 2005 10:30 PM
Chris
John wrote:
> I have a 325k VB.Net app that when loaded uses about 25Meg. There's SQL
> calls, etc. but how can it take up so much space and how can I reduce the
> memory footprint? John
>
>

You have to remember that the 325k vb.net app uses the .net framework
classes, so your executable uses a subset of some 25 meg .net install.

Chris
Author
4 Jul 2005 6:25 PM
m.posseth
Well i also thought that the memory footprint of a   .Net application is way
to big

untill i discovered the following trick

Private Declare Auto Function SetProcessWorkingSetSize Lib "kernel32.dll"
(ByVal procHandle As IntPtr, ByVal min As Int32, ByVal max As Int32) As
Boolean
Friend Sub SetProcessWorkingSetSize()

Try

Dim Mem As Process = Process.GetCurrentProcess()

SetProcessWorkingSetSize(Mem.Handle, -1, -1)

Catch ex As Exception

End Try

End Sub

this will trim you applications memory usage ,,,, it is safe to use the
method call after the first start of your application and when your program
is beeing minimized










Show quoteHide quote
"John" <j***@marxfamily.org> wrote in message
news:OzZbfFofFHA.3656@TK2MSFTNGP09.phx.gbl...
>I have a 325k VB.Net app that when loaded uses about 25Meg. There's SQL
>calls, etc. but how can it take up so much space and how can I reduce the
>memory footprint? John
>