ltq-adsl-mei: improve memory allocation
authorJohn Crispin <john@openwrt.org>
Sun, 30 Mar 2014 09:16:39 +0000 (09:16 +0000)
committerJohn Crispin <john@openwrt.org>
Sun, 30 Mar 2014 09:16:39 +0000 (09:16 +0000)
commit7fc3d7d7a8c164b558739b8d83a9818ef0676a01
tree7b6bfb58dfa2134a174176c128ade027c118961f
parentd75216ad89a8b125e1c7a32737ca129fbfad03ba
ltq-adsl-mei: improve memory allocation

The ltq-adsl-mei driver allocates memory for the ADSL firmware in a
rather stupid way, leading to several 128k allocations, which fail when
many services are enabled. This patch tries to allocate 64 kiB chunks,
and only falls back to larger allocations if the returned pointers are
not correctly aligned. Fixes out-of-memory errors on Danube boards with
32 MiB RAM.

Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
SVN-Revision: 40325
package/kernel/lantiq/ltq-adsl-mei/src/lantiq_mei.c