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@gmail.com
Thanks, Myles