Subversion Repositories HelenOS

Rev

Rev 2479 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2479 Rev 2565
Line -... Line 1...
-
 
1
#include <stdio.h>
-
 
2
#include <libc.h>
1
/*
3
/*
2
  This is a version (aka dlmalloc) of malloc/free/realloc written by
4
  This is a version (aka dlmalloc) of malloc/free/realloc written by
3
  Doug Lea and released to the public domain, as explained at
5
  Doug Lea and released to the public domain, as explained at
4
  http://creativecommons.org/licenses/publicdomain.  Send questions,
6
  http://creativecommons.org/licenses/publicdomain.  Send questions,
5
  comments, complaints, performance data, etc to dl@cs.oswego.edu
7
  comments, complaints, performance data, etc to dl@cs.oswego.edu
Line 470... Line 472...
470
#define MALLOC_ALIGNMENT ((size_t)16U)
472
#define MALLOC_ALIGNMENT ((size_t)16U)
471
#else
473
#else
472
#define MALLOC_ALIGNMENT ((size_t)8U)
474
#define MALLOC_ALIGNMENT ((size_t)8U)
473
#endif
475
#endif
474
 
476
 
475
#define FOOTERS 0
477
#define FOOTERS 0 
476
#define ABORT  abort()
478
#define ABORT  \
-
 
479
{ \
-
 
480
    DEBUG("%s abort in %s on line %d\n", __FILE__, __func__, __LINE__); \
-
 
481
    abort(); \
-
 
482
}
477
#define ABORT_ON_ASSERT_FAILURE 1
483
#define ABORT_ON_ASSERT_FAILURE 1
478
#define PROCEED_ON_ERROR 0
484
#define PROCEED_ON_ERROR 0
479
#define USE_LOCKS 1
485
#define USE_LOCKS 1
480
#define INSECURE 0
486
#define INSECURE 0
481
#define HAVE_MMAP 0
487
#define HAVE_MMAP 0
Line 549... Line 555...
549
#ifndef LACKS_STDLIB_H
555
#ifndef LACKS_STDLIB_H
550
#include <stdlib.h>      /* for abort() */
556
#include <stdlib.h>      /* for abort() */
551
#endif /* LACKS_STDLIB_H */
557
#endif /* LACKS_STDLIB_H */
552
#ifdef DEBUG
558
#ifdef DEBUG
553
#if ABORT_ON_ASSERT_FAILURE
559
#if ABORT_ON_ASSERT_FAILURE
554
#define assert(x) {if(!(x)) {printf(#x);ABORT;}}
560
#define assert(x) {if(!(x)) {DEBUG(#x);ABORT;}}
555
#else /* ABORT_ON_ASSERT_FAILURE */
561
#else /* ABORT_ON_ASSERT_FAILURE */
556
#include <assert.h>
562
#include <assert.h>
557
#endif /* ABORT_ON_ASSERT_FAILURE */
563
#endif /* ABORT_ON_ASSERT_FAILURE */
558
#else  /* DEBUG */
564
#else  /* DEBUG */
559
#define assert(x)
565
#define assert(x)