Malloc.c 543 B

12345678910111213141516171819202122232425262728
  1. /* $Id$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. /* M E M O R Y A L L O C A T I O N R O U T I N E S */
  7. /* The memory allocation routines offered in this file are:
  8. char *Malloc(n) : allocate n bytes
  9. */
  10. #if __STDC__
  11. #include <stdlib.h>
  12. #else
  13. extern char *malloc();
  14. #endif
  15. #include "alloc.h"
  16. char *
  17. Malloc(sz)
  18. unsigned int sz;
  19. {
  20. register char *res = malloc(sz);
  21. if (sz && res == 0) No_Mem();
  22. return res;
  23. }