Memory Usage

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    Memory Usage

    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


  • Chris

    #2
    Re: Memory Usage

    John wrote:[color=blue]
    > 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
    >
    >[/color]

    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

    Comment

    • m.posseth

      #3
      Re: Memory Usage

      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 SetProcessWorki ngSetSize Lib "kernel32.d ll"
      (ByVal procHandle As IntPtr, ByVal min As Int32, ByVal max As Int32) As
      Boolean
      Friend Sub SetProcessWorki ngSetSize()

      Try

      Dim Mem As Process = Process.GetCurr entProcess()

      SetProcessWorki ngSetSize(Mem.H andle, -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










      "John" <john@marxfamil y.org> wrote in message
      news:OzZbfFofFH A.3656@TK2MSFTN GP09.phx.gbl...[color=blue]
      >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
      >[/color]


      Comment

      Working...