Right, but the same code in 8l does the while
loop, and most of the code in 5l does the while loop,
so for consistency it seems it should also be a while loop
here.
On Dec 10, 2014, at 2:07 AM, Charles Forsyth wrote:
>
> On Wed, Dec 10, 2014 at 1:19 AM, yoann padioleau
> wrote:
> it should b
On Wed, Dec 10, 2014 at 1:19 AM, yoann padioleau
wrote:
> it should be while(chunk < sizeof(Prog))
a hunk is always much bigger than sizeof(Prog) so it's the same as if
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 mem
There is a related bug still in this file in ldobj() I think:
if(nhunk < sizeof(Prog))
gethunk();
p = (Prog*)hunk;
nhunk -= sizeof(Prog);
hunk += sizeof(Prog);
it should be while(chunk < sizeof(Prog))
(or even better again, a simple call to malloc(s
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 wrote:
> in 5l/obj.c#zaddr()
> there is:
> case D_FCONST:
>
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) inste