Rockbox Development > Starting Development and Compiling
Please help with porting of little lib.
(1/1)
Gnelik:
It is lib for parsing math expressions.
The most problem is in memory managment.
please help!!!
[attachment deleted by admin, too old]
saratoga:
If the calls to malloc are the only problem, it looks like you could just statically allocate memory for them. Theres only two, and it looks like they're fairly small variables anyway (I think?).
Gnelik:
I can't understand how to make it work with array :(.
I am going to write a graph builder but i can't continue without it. Please help me!
saratoga:
Well since the variable you're mallocing space for is tydefed like so:
typedef struct ff_expr_s AVEvalExpr;
I'm not too surprised arrays don't work ;)
Bagder:
Since the malloc()s are used to build trees etc in this code, I would advice having two arrays of structs, and then for each malloc() you pick one from the list to use and mark it as used - simulating malloc(). The number of array entries would need to be tweaked to work with a suitable worst case.
Navigation
[0] Message Index
Go to full version