[haiku-bugs] Re: [Haiku] #6178: RAM 1GB of 4GB reported used after boot

  • From: "Wim" <trac@xxxxxxxxxxxx>
  • Date: Sat, 19 Jun 2010 05:38:22 -0000

#6178: RAM 1GB of 4GB reported used after boot
-------------------------------+--------------------------------------------
  Reporter:  michael.weirauch  |       Owner:  axeld         
      Type:  bug               |      Status:  reopened      
  Priority:  normal            |   Milestone:  R1            
 Component:  System/Kernel     |     Version:  R1/Development
Resolution:                    |    Keywords:                
 Blockedby:                    |       Patch:  0             
  Platform:  x86               |    Blocking:                
-------------------------------+--------------------------------------------

Comment(by Wim):

 Replying to [comment:6 bonefish]:
 > [http://dev.haiku-
 os.org/browser/haiku/trunk/src/system/kernel/system_info.cpp?rev=37000#L148
 _user_get_system_info()] needs to be changed to copy no more than
 requested back to userland, though.
 I don't understand this. Within this function the size parameter is only
 used in the following line:
 {{{
 status_t status = _get_system_info(&info, size);
 }}}
 and this call returns B_BAD_VALUE anyway when size != sizeof(system_info).
 It seems to me that the size parameter is pretty useless.

 I am attaching a patch that I think should be sufficient. I don't dare to
 make the commit myself in fear of the wrath of the Haiku kernel developers
 :D

 After this patch is accepted I will work on the AboutSystem app to report
 inaccessible memory. sysinfo will revert to its old behavior, which is
 probably better.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6178#comment:8>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: