how is memory managed in emulators..
like in bochs we are able to store values and load values frm virtual processor memory while emulating .
where does bochs store these values ??
Emulators
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Emulators
in a malloc()ed piece of memory
where else did you expect?
where else did you expect?
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
Re: Emulators
That really depends upon the implementation
Regards
Shrek
Regards
Shrek
Re: Emulators
the address space that is emulated is very big and malloc will run out of space. what can be done in that case.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Emulators
Bochs probably has its own memory manager with some method of allocating that has less overhead than malloc. It would definitely not run out of memory. On a 32-bit system bochs would get about 3 GB of address space, and on a 64-bit (Linux) system it gets 128TB. The smaller address space in 32-bit systems is probably why bochs limits emulated memory at 2 GB.
I'm also willing to bet bochs doesn't hold memory that you haven't used yet to keep things small when possible.
EDIT: spelling
I'm also willing to bet bochs doesn't hold memory that you haven't used yet to keep things small when possible.
EDIT: spelling
Last edited by JohnnyTheDon on Sun Jan 11, 2009 1:20 am, edited 1 time in total.
Re: Emulators
All of the operating systems that Bochs runs under have virtual memory systems. It does not matter how much physical memory is on the machine that is running Bochs. Any program running on any of these machines can allocate more virtual memory with malloc than the machine actually contains physically. That is what virtual memory is for.