473,387 Members | 1,542 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,387 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 4141
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.