Implicit out of memory check in Release Mode

This commit is contained in:
vemax78
2013-08-11 22:50:12 +02:00
parent 7ddb32d217
commit badad6e71d
3 changed files with 8 additions and 6 deletions

View File

@ -26,7 +26,7 @@ void capwap_dump_memory(void);
#define ASSERT(expr)
/* Standard memory management */
#define capwap_alloc(x) (void*)malloc(x)
#define capwap_alloc(l) ({ void* __x = malloc(l); if (!__x) capwap_outofmemory(); __x; })
#define capwap_free(x) free(x)
#define capwap_check_memory_leak(x) (0)
#define capwap_dump_memory() (0)