Changeset 40676a2 in mainline for uspace/lib/libc/malloc/malloc.c


Ignore:
Timestamp:
2007-10-03T06:38:27Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
96858e8
Parents:
813a703
Message:

Make uspace malloc() verbose when it aborts due to inconsistencies.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/malloc/malloc.c

    r813a703 r40676a2  
     1#include <stdio.h>
     2#include <libc.h>
    13/*
    24  This is a version (aka dlmalloc) of malloc/free/realloc written by
     
    473475#endif
    474476
    475 #define FOOTERS 0
    476 #define ABORT  abort()
     477#define FOOTERS 0
     478#define ABORT  \
     479{ \
     480        DEBUG("%s abort in %s on line %d\n", __FILE__, __func__, __LINE__); \
     481        abort(); \
     482}
    477483#define ABORT_ON_ASSERT_FAILURE 1
    478484#define PROCEED_ON_ERROR 0
     
    552558#ifdef DEBUG
    553559#if ABORT_ON_ASSERT_FAILURE
    554 #define assert(x) {if(!(x)) {printf(#x);ABORT;}}
     560#define assert(x) {if(!(x)) {DEBUG(#x);ABORT;}}
    555561#else /* ABORT_ON_ASSERT_FAILURE */
    556562#include <assert.h>
Note: See TracChangeset for help on using the changeset viewer.