[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fixed size stack
From: |
Luca |
Subject: |
Re: fixed size stack |
Date: |
Wed, 18 Jul 2012 21:33:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
As a compiler and firmware writer, I think this is a very interesting issue.
First, take into account to use the bison macro YYMALLOC and YYFREE (see
bison output c file).
Then I can suggest to use a tiny and efficient memory manager like this one:
http://eli.thegreenplace.net/2008/10/17/memmgr-a-fixed-pool-memory-allocator/
I used it on a uC with 96 KB of RAM, without bison but with a RTOS
running many task: a TCP-IP task to manage a webserver, a SPI task, many
tasks for UART and also with two proprietary interpreters. Moreover, the
library allows a printout of allocation statistics that will help to
understand how the memory is used.
Luca
On 17/07/2012 10:00, Claudio Eterno wrote:
Hi folks,
I'm writing here due to some configuration problems on bison.
My question: I would like to use bison for an embedded application (based
on a uC with only 16kb of ram a 256 kb of flash). Due to the limited
resources reasons and also I know exactly the maximum size of
the necessary stack, I don't want to occupy the memory with me unuseful
library functions (like malloc for example). Anyway, is this possible to
remove the alloc/malloc/realloc functions during compilation?
Thank you,
Claudio