virtual-memory

Is an entire process’s virtual address space split into pages

Note: I'm attempting to study a high-level overview of Virtual Memory allocation Is an entire process's virtual address space split into pages, of a particular size: .text .bss .data Does this also include heap space and stack - or is this always non-pageable? ...

What is RVA and VA?

Please explain what RVA and VA means ...

How to simulate the Out Of memory : Requested array size exceeds VM limit

I used the Out Of Memory help from sun's site. Where it is quoted as Out Of Memory : Requested array size exceeds VM limit This indicates that the application attempted to allocate an array that is larger than the heap size. For example, if an application tries to allocate an array of 512MB but the maximum heap size is 256MB, then this...

32 bit OS , 32 bit processor what do they exactly mean

Whats is the exact meaning of 32 bit OS , 32 bit processor? Does it influence the size of address bus? Does it influence the number of virtual address that can be generated? How will it affect the register size means does the register size? What impact it has on virtual memory/ memory management I am a begineer in this area please po...

What are the exact conditions based on which Linux swaps process(s) memory from RAM to a swap file?

My server has 8Gigs of RAM and 8Gigs configured for swap file. I have memory intensive apps running. These apps have peak loads during which we find swap usage increase. Approximately 1 GIG of swap is used. I have another server with 4Gigs of RAM and 8 Gigs of swap and similar memory intensive apps running on it. But here swap usage i...

Difference between sequential write and random write

What is the difference between sequential write and random write in case of :- 1)Disk based systems 2)SSD [Flash Device ] based systems When the application writes something and the information/data needs to be modified on the disk then how do we know whether it is a sequential write or a random write.As till this point a write cannot b...

.NET API for determining VM fragmentation

Is there a .NET API for getting detailed info on VM use? I'm specifically interested in determining how fragmented my address space is. Thanks! ...

malloc behaves differently on different machines

Hi, I see totally different behavior when running a piece of program that tries to exceed RSS on different machines. The code is something like: ... char** s = (char**)malloc(10000*sizeof(char*)); for (i = 0; i < 10000; i++){ s[i] = (char*)malloc(1000*1000*sizeof(char)); if (s[i] == NULL) { printf("cannot allocate me...

Effect of short term high VM memory usage (Windows)

In the app I'm writing, I use a lot of in memory containers (C++ std containers but I don't think that's relevant). During one "task" of my app, in a heavy usage edge-case the private bytes memory usage hits 1GB. Just as a bit of context, this task is a user initiated task involving 100,000s files. It's likely that the user will kick t...

Can you force a crash if a write occurs to a given memory location with finer than page granularity?

I'm writing a program that for performance reasons uses shared memory (sockets and pipes as alternatives have been evaluated, and they are not fast enough for my task, generally speaking any IPC method that involves copies is too slow). In the shared memory region I am writing many structs of a fixed size. There is one program responsibl...

A PE file which is larger than 2GB

I'm reading Windows via c/c++. And I just wonder a large file can be mapped to memory. When we execute an application, a PE file is mapped their process address(user partition). In 32bit Windows, a Large file(larger than 2GB) can be loaded to user partition? or it will be failed? If it is possible, Does Paging file help the loading? ...

How can I get read-ahead bytes?

Operating systems read from disk more than what a program actually requests, because a program is likely to need nearby information in the future. In my application, when I fetch an item from disk, I would like to show an interval of information around the element. There's a trade off between how much information I request and show, an...

OS kernel use Virtual memory for itself?

Does OS kernel use Virtual memory or Can some part of the OS kernel reside in Hard Disk? ...

In what circumstances can large pages produce a speedup ?

Modern x86 CPUs have the ability to support larger page sizes than the legacy 4K (ie 2MB or 4MB), and there are OS facilities (Linux, Windows) to access this functionality. The Microsoft link above states large pages "increase the efficiency of the translation buffer, which can increase performance for frequently accessed memory". Whic...

Maximum size of application memory space on 32 (x86)? 2 Gb or 1 Gb?

What amount of memory is available (theoretically) to application on 32 bit system? Different OSes? 2 or 1 Gb? thx! ...

How to reliably measure available memory in Linux?

Linux /proc/meminfo shows a number of memory usage statistics. MemTotal: 4040732 kB MemFree: 23160 kB Buffers: 163340 kB Cached: 3707080 kB SwapCached: 0 kB Active: 1129324 kB Inactive: 2762912 kB There is quite a bit of overlap between them. For example, as far as I understand, there ca...

Is an Object the smallest pageable unit in the Heap?

Hi, If I have a 2 GB ram and I have an 2 instances of an Object which is 1.5 GB each, the operating system will help and context switch the pages to and from harddisk. What if I have 1 instances but is 3 GB. Can the same paging method breakdown this instances into 2 pages? Or will I encounter out-of-memory issue? I will also like to ...

What is "Virtual Size" in sysinternals process explorer

Hi My application runs for few hours, There is no increase in any value ( vmsize, memory) of Task Manager. But after few hours i get out of memory errors. In sysinternals i see that "Virtual Size" is contineously increasing, and when it reach around 2 GB i start getting memory errors. So what kind of memory leak is that ? How can i d...

Linux: page faults and network filesystems

If a Linux system runs out of physical memory, does it drop inactive executable code pages? I assume the answer is yes, since there is no reason to keep them in swap, so they are simply discarded and re-loaded if necessary (as far as I know, that's what FreeBSD does). If the above is true for Linux, my question is, how does it handle ex...

.NET garbage collector and x64 virtual memory

Running a .NET application on Windows Server 2008 x64 with 16GB of RAM. This application needs to fetch and analyze a very large amount of data (about 64GB), and keep it all in memory at one time. What I expect to see: Process size expands past 16GB to 64GB. Windows uses virtual memory to page the extra data to/from disk as needed. This...