Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. Memory Build shown by task manager in Windows

Memory Build shown by task manager in Windows

Scheduled Pinned Locked Moved System Admin
performancequestionlounge
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    srikanth_codeproject
    wrote on last edited by
    #1

    Hi, Was just trying out a small sample code which allocates certain amount of memory(say 80 MB).Now the Task Manager shows certain amount of memory(xxxx). I generate 400000 random numbers and free of the memory in those locaitons. the random number funda is used to have a defragmented deallocation. Even after freeing almost half(40 MB) of memory the Task manager dosent seem to show the reduction. I guess, this is because of the defragmented deallocation which was done.Any suggetions or comments??? srikanth sundaragopalan

    M 1 Reply Last reply
    0
    • S srikanth_codeproject

      Hi, Was just trying out a small sample code which allocates certain amount of memory(say 80 MB).Now the Task Manager shows certain amount of memory(xxxx). I generate 400000 random numbers and free of the memory in those locaitons. the random number funda is used to have a defragmented deallocation. Even after freeing almost half(40 MB) of memory the Task manager dosent seem to show the reduction. I guess, this is because of the defragmented deallocation which was done.Any suggetions or comments??? srikanth sundaragopalan

      M Offline
      M Offline
      Mike Nordell
      wrote on last edited by
      #2

      This is probably in the workings of the (MSVC I presume) CRT memory manager. Have a look at the malloc/free (and its implementation functions) sources and you'll see likely causes. Basically, it doesn't give up memory to the OS right away. Disclaimer: This depends on the OS and version of the MS CRT! MSVC6+ using NT5+ uses the plain HeapAlloc API's where older versions do not, and IIRC it's only for allocations above/below a certain threshold.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups