VirtualBox

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2918 closed defect (invalid)

Possible Memory Leak on Windows XP Host

Reported by: Brian Kloppenborg Owned by:
Component: host support Version: VirtualBox 2.1.0
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

I am running VirtualBox 2.1.0 on a Windows XP SP3 Host. The Host is an Athlon XP 3000+ processor with 1 GB of RAM. I run Ubuntu 8.04 in a VM (with 400 MB of RAM and 128 MB of VRAM) in headless mode. The VM is attached to one of two Host Interfaces using the new host interface driver introduced in 2.1.0 (although this problem existed in VirtualBox 2.06). The host interface in question is an older PCI network adapter. I have not tried the VM setup with the on-board Ethernet adapter.

I have noticed that while the VM is running, the system starts with ~600 MB free and then slowly decreases, at about 50 KB per second. I have also noticed that if I transfer files over the network (i.e. VM to another machine on the network) the available system memory decreases, almost bit per bit, while the file transfer is in progress. This continues until ~11 MB of memory is left at which time the Windows Host either hangs or blue screens.

Please let me know what else I can provide to get this issue resolved.

Change History (4)

comment:1 by Sander van Leeuwen, 15 years ago

Can you confirm that the memory used by VirtualBox.exe increases likewise? You can use a process manager or simply look at the task manager entry for the process.

in reply to:  1 comment:2 by Brian Kloppenborg, 15 years ago

Replying to sandervl73:

Using the task manager with the "show processes from all users" checkbox checked I did not notice the memory usage of either vBoxHeadless.exe or VirtualBox.exe increasing at a rate similar to the rate at which the system memory is decreasing.

VBoxHeadless.exe started at ~28 MB and increased at a rate of ~10 kB/s while I was transfering a large file. Similarly when I started the VM with a GUI, VirtualBox.exe started at ~32 MB and increased in size at a rate of ~10 kB/s. Contrasted with the memory decrease at about 1 MB/s, there doesn't appear to be much of a correlation.

Notice that Task Manager does not show the total amount of memory allocated to the Virtual Machine (I would expect 400+ MB). I also used Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) and could not see any large amounts of memory being allocated to any VirtualBox associated process. I could not see memory allocation per-thread so perhaps I should have used a different task manager.

I did some additional testing with 300 MB of memory allocated to the virtual machine. When I start the VM, about 100 MB of system memory is used and that amount steadily increases as the VM boots. Then, if I transfer 400 MB of data to the VM (more than the VM's total allocated memory) the system memory steadily decreases and then levels off with approximately 391 MB being used by the VM.

It appears that what I interpreted as a memory leak is instead dynamic memory allocation. I expected VirtualBox's memory allocation scheme on a Windows host to behave like it does on a Linux host where all of the VM's memory is allocated before the VM's boot process begins.

Clearly this is not a bug so this ticket may be closed, but is the memory allocation scheme for different hosts documented somewhere? I didn't see anything mentioned about it in the manual. Thank you.

comment:3 by Michael Thayer, 15 years ago

Resolution: invalid
Status: newclosed

comment:4 by Sander van Leeuwen, 15 years ago

It actually depends on the guest. The VM's ram is allocated on demand. Some OSes touch all memory during boot (e.g. Windows), whereas others don't (e.g. Linux).

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use