I am using an calloc routine and it is giving me an address of zero even though I have initialized the memory with init_mempool (0x0600, 0x02FF); Can you help? What is happening and what should I do about it? Sean
generally agree about use of malloc and calloc. But we must use half our data area for one thing at the start and another for later. I suggested an union, but we have not finialized on that. In the meantime I have found my problem: it was supposed to return NULL, that was part of the test. But the NULL was not comparing well vs the standard NULL. So I put in an xdata attribute and all works now. Thank you for your help, Sean
See this thread for a similar problem with pointer comparions and NULL: http://www.keil.com/forum/docs/thread3443.asp
But we must use half our data area for one thing at the start and another for later. I suggested an union, but we have not finialized on that. Why even do that. If the variables are local to two different routines, they will only take one space. Erik