
13 Mar
2013
13 Mar
'13
5:06 p.m.
Dear Simon Glass,
In message CAPnjgZ2bSf8-9gw6MweexMUEXDTYNspxth0GA0XN3RpkLO4R8w@mail.gmail.com you wrote:
Given that we seem to allow C99 features in U-Boot I wonder if it would be OK to use dynamic arrays in SPL?
Strange. I can see the follow-ups, but I cannot see the original posting?
In the function pow_mod(), I would like to replace:
val = malloc(key->len * sizeof(uint32_t));
with:
uint32_t val[key->len];
malloc() adds at least 1KB, perhaps 2KB.
I think it is perfectly OK to do that. Actually I think we already do this in a number of places.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"The trouble with doing something right the first time is that nobody
appreciates how difficult it was." - Walt West