Page 1 of 1

Emulators

Posted: Sat Jan 10, 2009 3:28 pm
by octa
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 ??

Re: Emulators

Posted: Sat Jan 10, 2009 5:45 pm
by Combuster
in a malloc()ed piece of memory

where else did you expect?

Re: Emulators

Posted: Sat Jan 10, 2009 10:19 pm
by DeletedAccount
That really depends upon the implementation :wink:

Regards
Shrek

Re: Emulators

Posted: Sat Jan 10, 2009 10:44 pm
by octa
the address space that is emulated is very big and malloc will run out of space. what can be done in that case.

Re: Emulators

Posted: Sat Jan 10, 2009 11:31 pm
by JohnnyTheDon
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

Re: Emulators

Posted: Sun Jan 11, 2009 1:12 am
by bewing
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.