OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 24, 2024 12:23 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Bochs memory messages
PostPosted: Thu Feb 13, 2014 11:45 am 
Offline
Member
Member

Joined: Wed Nov 14, 2012 4:55 pm
Posts: 103
Hello, I see some messages in bochs and I don't understand them. I assume it's about memory usage.
What does this mean?
Code:
00005248076i[MEM0 ] allocate_block: block=0x18 used 0x3 of 0x800


Top
 Profile  
 
 Post subject: Re: Bochs memory messages
PostPosted: Thu Feb 13, 2014 12:04 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
Code:
$ find -iname "*.cc" | xargs grep -n "allocate_block:"
./memory/misc_mem.cc:218:          BX_INFO(("allocate_block: block=0x%x, replaced 0x%x",   
./memory/misc_mem.cc:223:        BX_INFO(("allocate_block: block=0x%x used 0x%x of 0x%x",
./memory/misc_mem.cc:235:  BX_DEBUG(("allocate_block: used_blocks=0x%x of 0x%x", BX_MEM_THIS used_blocks, max_blocks));

Code:
#if BX_LARGE_RAMFILE
  /*
   * Match block to vector address
   * First, see if there is any spare host memory blocks we can still freely allocate
   */

Bochs uses lazy allocation of memory, so everytime you access a new block of RAM, it'll allocate one. In this case, support for Guest RAM > Host RAM is enabled which can swap out pages to disk when they're not used, which in turn means additional log information because it's fairly new.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: Bochs memory messages
PostPosted: Thu Feb 13, 2014 12:07 pm 
Offline
Member
Member

Joined: Wed Nov 14, 2012 4:55 pm
Posts: 103
Ok so thoses messages are related to the emulator and not to the OS. I thought they showed up because I did an error in my memory manager.
Thank you


Top
 Profile  
 
 Post subject: Re: Bochs memory messages
PostPosted: Fri Apr 04, 2014 3:40 pm 
Offline
Member
Member

Joined: Wed Nov 14, 2012 4:55 pm
Posts: 103
Are those messages usefull for debug? What does block mean? And what do the numbers tell me there?

Code:
[MEM0 ] allocate_block: block=0x10 used 0x3 of 0x200


Top
 Profile  
 
 Post subject: Re: Bochs memory messages
PostPosted: Sat Apr 05, 2014 2:55 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
I can guess, but to give an accurate answer I will have to look at the source again, which is something you could do in my place.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 65 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group