Re: Memory Limit
- From: Barry Schwarz <schwarzb@xxxxxxxxx>
- Date: Sat, 25 Aug 2007 11:40:59 -0700
On Wed, 22 Aug 2007 01:26:01 -0700, mustafa <mustafa@xxxxxxxxxxxxxxxx>
wrote:
To be more precise,
1) What is the maximum size of the array that I can create?
2) Is Heap or Stack based variable declaration just affects the speed? I
mean, is it possible to create the same maximum size array with the stack,
just sacrificing the speed?
Since Windows uses a virtual memory model, the real issues affecting
performance (speed) are locality of references, size of cache
(determines frequency of cache hits), amount of real memory available
to the program (determines frequency of paging), what other processes
are running (determines how much CPU your program gets), and a whole
bunch of other stuff you have no control over. If stack vs heap has
any affect, it is insignificant compared to the other issues.
3) Having 2GB physical memory doesnt mean that you can use all this space,
because some part of this memory is already consumed by Operating system by
default.
Not to mention other processes running (firewall, virus checker, task
scheduler, clock interrupt handler, etc).
4) Do I need to use PhysicalMemory defragmentation? If yes what kind of tool
I can use for this purpose?
In a virtual memory system, physical memory is so dynamic that even if
you could defragment it, it would become fragmented again almost
immediately.
5) Why increasing the virtual memory ( = page file ?) to 10-20 GB doesnt
help to create bigger arrays?
Are there compiler or OS constraints on how much memory your program
will be allowed to consume?
6) Having 10GB virtual memory means that I can create 10GB size array?
See 5 above.
Remove del for email
.
- References:
- Re: Memory Limit
- From: Nathan Mates
- Re: Memory Limit
- From: mustafa
- Re: Memory Limit
- From: mustafa
- Re: Memory Limit
- Prev by Date: Re: Memory Limit
- Next by Date: privileged instructions
- Previous by thread: Re: Memory Limit
- Next by thread: Re: Memory Limit
- Index(es):
Relevant Pages
|
Loading