[coreboot] #146: memalign requests huge amounts of memory for large alignments (was: memalign faild with 4k boundary)

coreboot svn at coreboot.org
Wed May 5 15:53:46 CEST 2010


#146: memalign requests huge amounts of memory for large alignments
-------------------------------------+--------------------------------------
   Reporter:  wangqingpei@…          |          Owner:  oxygene
       Type:  defect                 |         Status:  closed 
   Priority:  blocker                |      Milestone:         
  Component:  libpayload             |     Resolution:  fixed  
   Keywords:                         |   Dependencies:         
Patchstatus:  there is no patch      |  
-------------------------------------+--------------------------------------
Changes (by oxygene):

  * keywords:  memalign crashed =>
  * status:  assigned => closed
  * resolution:  => fixed


Comment:

 Fixed in r5298, which included the attached patch.

 memalign doesn't try to allocate at least 100 units of memory (which meant
 400kb for 4kb of 4kb-aligned memory.
 It only allocates at least a kilobyte of data, which should match most use
 cases: For more common 16byte requests, 1kb is allocated and pooled for
 16byte requests, for relatively rare 4kb requests, 4kb is allocated (as
 it's already >1kb)

-- 
Ticket URL: <https://tracker.coreboot.org/trac/coreboot/ticket/146#comment:3>
coreboot <http://www.coreboot.org/>



More information about the coreboot mailing list