[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua on Atmel's AVR Microcontrollers
- From: Harald Kipp <harald.kipp@...>
- Date: Fri, 04 Jun 2004 13:29:28 +0200
I hadn't a chance to look into 5.1, but 5.0 uses realloc()
In case of simple, MMU-less memory banking, allocation
is no big deal, but accessing items is. As only a few
banks (only one in our case) are visible at a time, banks
have to be switched before accessing the data in the bank.
At 07:34 04.06.2004 -0300, you wrote:
>If there are somehow central points, where Lua accesses
>large memory areas, one could implement this.
I'm not sure what you mean, but Lua 5.1 does not rely on malloc. Instead, the
host is required to provide a memory allocator when creating a Lua state. So,
you can implement whatever allocation policy when need or want. But Lua will
still ask for memory as it needs, that is, not in blocks.