On Mon, Feb 7, 2011 at 3:38 PM, Lei Wen <adrian.w...@gmail.com> wrote:
> Hi Wolfgang,
>
> On Mon, Feb 7, 2011 at 12:08 AM, Wolfgang Denk <w...@denx.de> wrote:
>> Dear Lei Wen,
>>
>> In message <aanlktin1u7wznvkhoatzkw4uedq1iztlzbo6-qbmo...@mail.gmail.com> 
>> you wrote:
>>>

> My current implementation is to do a memory dump by using the uboot,
> while uboot's only task is to compress and write the memory to the sd card.
> For the compress and write part need a lot of heap, 350k+, if still keep the
> env buf in the stack, it would increase the total memory touched by uboot...
>
> As dump usage need uboot touch the least memory, so this is the purpose
> I submit this patch... Reuse the heap area at its best, and don't increase 
> stack
> much in the runtime...
>

Ah, so with the env buffer on the stack, the bottom of the stack is being
pushed into the memory you want to dump and corrupting it - Makes sense to
me now that you would resort to moving the env buffer to the heap.

There are probably a number of other areas in u-boot where large buffers
are put on the stack while the malloc pool is relatively empty with the
end result being that u-boot is using more memory than strictly required.

It would be an interesting profiling excercise

Regards,

Graeme
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to