Changeset 4677
- Timestamp:
- Jul 29, 2005, 4:45:31 PM (21 years ago)
- Location:
- trunk/Nebulous/nebclient/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/nebclient/src/xmalloc.c
r4505 r4677 2 2 * xmalloc.c - malloc that can't fail 3 3 * 4 * Copyright (C) 2003 Robert Lupton4 * Copyright (C) 2003-2005 Joshua Hoblitt, 2003 Robert Lupton 5 5 * 6 * $Id: xmalloc.c,v 1. 2 2005-07-07 22:03:16jhoblitt Exp $6 * $Id: xmalloc.c,v 1.3 2005-07-30 02:45:31 jhoblitt Exp $ 7 7 */ 8 8 … … 15 15 * Wrappers for malloc/free. xmalloc cannot fail. 16 16 */ 17 void * 18 xmalloc(size_t n) 17 void * xmalloc(size_t n) 19 18 { 20 19 void *ptr = malloc(n); … … 28 27 } 29 28 30 void * 31 xrealloc(void *ptr, size_t size) 29 void * xrealloc(void *ptr, size_t size) 32 30 { 33 31 void *newptr = realloc(ptr, size); … … 41 39 } 42 40 43 void 44 xfree(void *ptr) 41 void xfree(void *ptr) 45 42 { 46 43 free(ptr); -
trunk/Nebulous/nebclient/src/xmalloc.h
r4505 r4677 2 2 * xmalloc.h - malloc that can't fail 3 3 * 4 * Copyright (C) 2003 Robert Lupton4 * Copyright (C) 2003-2005 Joshua Hoblitt, 2003 Robert Lupton 5 5 * 6 * $Id: xmalloc.h,v 1. 3 2005-07-07 22:03:16jhoblitt Exp $6 * $Id: xmalloc.h,v 1.4 2005-07-30 02:45:31 jhoblitt Exp $ 7 7 */ 8 8 … … 10 10 #define XMALLOC_H 1 11 11 12 void * 13 xmalloc(size_t n); 12 void * xmalloc(size_t n); 14 13 15 void * 16 xrealloc(void *ptr, size_t size); 14 void * xrealloc(void *ptr, size_t size); 17 15 18 void 19 xfree(void *ptr); 16 void xfree(void *ptr); 20 17 21 18 #endif // XMALLOC_H
Note:
See TracChangeset
for help on using the changeset viewer.
