Back to index

tetex-bin  3.0
xrealloc.c File Reference
#include <stdio.h>
#include <kpathsea/config.h>

Go to the source code of this file.


void *xmalloc P1H (unsigned)
void *xrealloc P2C (void *, old_ptr, unsigned, size)

Function Documentation

void* xmalloc P1H ( unsigned  )
void* xrealloc P2C ( void ,
old_ptr  ,
unsigned  ,

Definition at line 25 of file xrealloc.c.

  void *new_mem;

  if (old_ptr == NULL)
    new_mem = xmalloc (size);
      new_mem = (void *) realloc (old_ptr, size);
      if (new_mem == NULL)
          /* We used to print OLD_PTR here using %x, and casting its
             value to unsigned, but that lost on the Alpha, where
             pointers and unsigned had different sizes.  Since the info
             is of little or no value anyway, just don't print it.  */
          fprintf (stderr, "fatal: memory exhausted (realloc of %u bytes).\n",
          /* 1 means success on VMS, so pick a random number (ASCII `B').  */
          exit (66);

  return new_mem;

Here is the call graph for this function: