
23 Aug
2011
23 Aug
'11
10:35 p.m.
On Tuesday, August 23, 2011 16:12:03 Wolfgang Denk wrote:
Anton Staaf wrote:
what about adding a new func like: #define dma_buffer_alloca(size)
I generally avoid large allocations on the stack, they can confuse virtual stack management and blow out small embedded stacks. But neither of these are really a problem for most U-Boot targets. Are you thinking something like:
#define dma_buffer_alloca(size) alloca(size + get_dcache_line_size() -
- & ~(get_dcache_line_size() - 1);
I don't think I will accept any alloca() based code into mainline.
hmm, for some reason i thought we were using alloca. but i dont see any consumers in u-boot itself. -mike