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)
commit3fbffbb7b018f3ac7d9bece160d3af74ec6b9312
treed6145d0886f93ff50af5fb88c83eb89f6232cdc6
parent8b0507c9ca55ca6ee2bc0a83f02a5b636d39b198
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