diff options
author | Ian C <ianc@noddybox.co.uk> | 2004-01-13 02:21:06 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2004-01-13 02:21:06 +0000 |
commit | 44ffbe36a8e7eaab7d7851bb79f229c4383c6545 (patch) | |
tree | 5ec706c58e940047021c0fd8665e96c6d3d50c58 /src/util.c | |
parent | 25bc35fbadebbf28eed3c89978e435d2df557b42 (diff) |
Added breakpoints to memory menu and added extra GUI items. Plus general fixes.
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -42,12 +42,23 @@ static const char ident_h[]=ESPEC_UTIL_H; */ void *Malloc(size_t size) { - void *p=malloc(size); + void *new=malloc(size); - if (!p) + if (!new) Exit("malloc failed for %lu bytes\n",(unsigned long)size); - return p; + return new; +} + + +void *Realloc(void *p, size_t size) +{ + void *new=realloc(p,size); + + if (!new) + Exit("realloc failed for %lu bytes\n",(unsigned long)size); + + return new; } |