the compilers use a very simple allocator which is designed for speed
rather than efficiency - as i remember it never frees anything and just
allocates from a heap.

it also works if you use libc's malloc and that will allow you to link big 
things
(like gs) on small memory machines. in reality memory is cheap and no one
likes to wait when they don't have to.

-Steve



> On 10 Dec 2014, at 00:24, yoann padioleau <aryx.pada...@gmail.com> wrote:
> 
> Also, by curiosity, does anybody know why 5a/, 5l/, 5c/
> (and the other architecture variants) are redefining
> malloc and free? Why not using the malloc and free
> from the libc?
> 
> 
>> On Dec 9, 2014, at 4:21 PM, yoann padioleau <aryx.pada...@gmail.com> wrote:
>> 
>> in 5l/obj.c#zaddr()
>> there is:
>>   case D_FCONST:
>>       while(nhunk < sizeof(Ieee))
>>           gethunk();
>>       a->ieee = (Ieee*)hunk;
>>       nhunk -= NSNAME;
>>       hunk += NSNAME;
>> 
>> I think it’s a copy paste bug, it should
>> be sizeof(Ieee) instead of those NSNAME
>> (or even better the whole code could be factorized
>> in a call to a->ieee = malloc(sizeof(Ieee));
> 

Reply via email to