memory_stub.c no longer needed?


I just upgraded to Developer Studio v1.2.0, and I noticed that the memory_stub.c file I have in my project (to declare malloc/free using the adl_memGet and release functions) was causing compilation problems. I commented out the file contents, and it successfully compiled. The binary seems stable, so I am guessing that memory_stub.c is no longer needed. Can someone confirm this?



It does not depend on the IDE but on the OS version you compile against. 6.34 includes malloc, free and calloc. (Calloc does not seem to check for NULL before memset though, but have not tested it). realloc and the reentrant versions seems not to be included, so you might still want to add those…

see [url]]

It is actually a post of yours which rang some alarm bells,

void *calloc(size_t n, size_t s)
   void *p = malloc(n*s);
  // NULL???
   memset(p, 0, n*s);
   return p;

I would not trust memset to handle NULL pointers correctly, since afaik it is a highly optimized version to set a block (and therefore most likely does not check for valid arguments)