Hi,

I've just started using SDCC, compiling for the Amstrad CPC 464 (Z80
CPU, 64kB RAM).

The following code:

  void *block = (void*)0;
  long size = 0;

  while (1)
    {
      size += 128;
      block = malloc(size);
      if (block == (void*)0)
        {
          printf("done\r\n");
          break;
        }
      else
        {
          printf("%ld\r\n", size);
          free(block);
        }
    }

... is only ever able to malloc() 896 bytes, producing the following
output:

128
256
384
512
640
768
896
done

-- 
Duncan Bayne
ph: +61 420817082 | web: http://duncan-bayne.github.com/ | skype:
duncan_bayne

I usually check my mail every 24 - 48 hours.  If there's something
urgent going on, please send me an SMS or call me at the above number.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to