473,320 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

memory

bob
if modern OSes free up memory for processes when they die,
why does rebooting Windows XP improve performance so much more than
closing all programs?

Apr 18 '06 #1
6 4133
bo*@coolgroups.com wrote:
if modern OSes free up memory for processes when they die,
why does rebooting Windows XP improve performance so much more than
closing all programs?


You should troll^H^H^H^H^Hask your question in a Microsoft Windows
programming newsgroup.

V
--
Please remove capital As from my address when replying by mail
Apr 18 '06 #2
bob wrote:
if modern OSes free up memory for processes when they die,
why does rebooting Windows XP improve performance so much more than
closing all programs?


This is an off-topic question which can easily sustain on-topic answers.

Your program's "heap" is the arena that returns storage for objects created
by 'new'.

A program's heap, on a desktop operating system, is one extent of storage
within a larger system heap. (So large OSs typically use a "heap of heaps".)

The Windows heap of heaps can push some pages of storage out to a swapper
file, to make room for other pages that are used more often.

The memory address your program uses is fake. The OS converts it to a real
address, and maybe swaps that address's contents back from the swapper file,
before the address gets as far as hardware memory.

Each time your program allocates memory from a heap, the OS might need to
allocate more storage from the heap-of-heaps for your program. All these
allocations typically follow a "first fit" algorithm. The memory manager
scans for the first block of unused storage larger than the request.

As a program allocates and deallocates, its memory fills up with small
unallocated blocks. A large, dynamic program should frequently rebalance its
objects in memory - moving them with a custom allocator, for example - to
compact the heap. That will leave larger blocks of free memory ready for the
next allocation, so that will be faster.

The Windows heap compaction system sucks.

An OS must compact its heap-of-heaps aggressively. And, in theory, this
process should be easier for an OS than a program, because the OS can move
memory simply by adjusting the real pointers that back up your program's
virtual pointers.

However, the Windows XP heap is widely known to fragment early and often.
Even if you close many programs, the OS is full of dynamic link libraries
that remain in memory after their programs discard them. When these have
data - even garbage - the OS defends them. And even if you cleared out these
libraries, I suspect that the XP heap would still be fragmented, _and_ its
representation in the swapper file would be fragmented too.

Rebooting will generally compact this heap!

Further questions on this topic belong on a newsgroup with winxp and kernel
in its name. I suspect you will learn there that Windows servers typically
schedule to reboot once a week.

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Apr 18 '06 #3
Phlip wrote:
bob wrote:
if modern OSes free up memory for processes when they die,
why does rebooting Windows XP improve performance so much more than
closing all programs?
This is an off-topic question which can easily sustain on-topic
answers.


But you managed to give an off-topic one. Why? To vent? To show off?
Your program's "heap" is the arena that returns storage for objects
created by 'new'.

A program's heap, on a desktop operating system, [..]
And why didn't you mention a cell phone operating system or a set-top
box operating system?
The Windows heap of heaps can [..]
Discussions on particular platforms are OT, don't you know?
The memory address your program uses is fake. [..]
That's platform-specific. On DOS, it isn't. Or did you mean "on his
particular platform"?
The Windows heap compaction system sucks.
*Shrug* Millions of users never complained.
An OS must compact its heap-of-heaps [..]
And another OS doesn't have to...
However, the Windows XP heap is widely known to [..]
Another broad generalization. Platform-specific. Trolling.
Rebooting will generally compact this heap!
Nonsense. Rebooting doesn't compact the heap. It blows it away and
creates another one. Besides, how is this all relevant to comp.lang.c++?
Further questions on this topic belong on a newsgroup with winxp and
kernel in its name. [...]


This is the only on-topic sentence out of the entire tirade. *Sigh*

V
--
Please remove capital As from my address when replying by mail
Apr 18 '06 #4
posted:
if modern OSes free up memory for processes when they die,
why does rebooting Windows XP improve performance so much more than
closing all programs?

Memory fragmentation.
-Tomás
Apr 18 '06 #5
On 17 Apr 2006 17:04:34 -0700, bo*@coolgroups.com wrote:
if modern OSes free up memory for processes when they die,
why does rebooting Windows XP improve performance so much more than
closing all programs?

Because XP means Xtraperformance by Powercycling
Apr 19 '06 #6
Zara wrote:
On 17 Apr 2006 17:04:34 -0700, bo*@coolgroups.com wrote:
if modern OSes free up memory for processes when they die,
why does rebooting Windows XP improve performance so much more than
closing all programs?

Because XP means Xtraperformance by Powercycling


Ummm,
Because Windows never seems to perform decent garbage collecting or
releasing once used memory. I noticed this by accident while monitoring
my Internet connection and Windows XP (other versions too) just kept
opening new ports in sequence when they were blocked by my firewall. I
suspect the same thing happens in just about all programs, especially
those that Microsoft writes. I have 1 GB of memory and no paging file,
yet it keeps telling me I am out of swap file space even when I have
nothing loaded and am doing something trivial. Bill Gates must be in
cahoots with the memory manufacturers, like buy 3 GB and the problem
will go away, until Vista 64, then all bets are off. I have to use
Windows for work and my daughters, but given a chance I will put in a
Linux drive and have fun.
Bill Baka (newbie here).
Apr 21 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andreas Suurkuusk | last post by:
Hi, I just noticed your post in the "C# memory problem: no end for our problem?" thread. In the post you implied that I do not how the garbage collector works and that I mislead people. Since...
4
by: Frank Esser | last post by:
I am using SQL 8 Personal edition with sp2 applied. I set the max server memory to 32MB and leave the min server memory at 0. When my application starts hitting the database hard the memory usage...
4
by: Franklin Lee | last post by:
Hi All, I use new to allocate some memory,even I doesn't use delete to release them. When my Application exit, OS will release them. Am I right? If I'm right, how about Thread especally on...
9
by: Mike P | last post by:
I know everything about reference counting and making sure you don't have large objects lying around. I have also profiled my app with multiple tools. I know about the fact GC collects memory but...
22
by: xixi | last post by:
hi, we are using db2 udb v8.1 for windows, i have changed the buffer pool size to accommadate better performance, say size 200000, if i have multiple connection to the same database from...
14
by: Alessandro Monopoli | last post by:
Hi all, I'm searching a PORTABLE way to get the available and total physical memory. Something like "getTotalMemory" and it returns the memory installed on my PC in bytes, and...
1
by: Nick Craig-Wood | last post by:
I've been dumping a database in a python code format (for use with Python on S60 mobile phone actually) and I've noticed that it uses absolutely tons of memory as compared to how much the data...
5
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS...
1
by: Jean-Paul Calderone | last post by:
On Tue, 22 Apr 2008 14:54:37 -0700 (PDT), yzghan@gmail.com wrote: The test doesn't demonstrate any leaks. It does demonstrate that memory usage can remain at or near peak memory usage even after...
5
by: cham | last post by:
Hi, I am working on c++ in a linux system ( Fedora core 4 ), kernel version - 2.6.11-1.1369_FC4 gcc version - 4.0.0 20050519 ( Red Hat 4.0.0-8 ) In my code i am creating a vector to store...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.