[coreboot] [PATCH] reduce the size of devices

Myles Watson mylesgw at gmail.com
Thu May 20 21:16:33 CEST 2010


Use linked lists for resources instead of fixed arrays.

resources.diff - changes the definitions
resource_usage.diff - changes the functions where resources are used
sconfig.diff - changes the device tree

>From the qemu boot log:
before:
malloc Enter, size 1092, free_mem_ptr 00118444
malloc 00118444

after:
malloc Enter, size 228, free_mem_ptr 001180e4
malloc 001180e4

I allocate resources in blocks of 64.  It could be smaller to decrease
memory usage, but I think it's plenty large (2560 bytes)

Signed-off-by: Myles Watson <mylesgw at gmail.com>

Thanks,
Myles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resources.diff
Type: text/x-patch
Size: 2021 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100520/4ed13360/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resource_usage.diff
Type: text/x-patch
Size: 30462 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100520/4ed13360/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sconfig.diff
Type: text/x-patch
Size: 2405 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100520/4ed13360/attachment-0002.diff>


More information about the coreboot mailing list