projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
we can do without the odd align.h
[libfirm]
/
ir
/
adt
/
pdeq.c
diff --git
a/ir/adt/pdeq.c
b/ir/adt/pdeq.c
index
dddbab2
..
8d596d0
100644
(file)
--- a/
ir/adt/pdeq.c
+++ b/
ir/adt/pdeq.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-200
7
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-200
8
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-24,22
+24,11
@@
* @date 1999 by getting from fiasco
* @version $Id$
*/
* @date 1999 by getting from fiasco
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "firm_config.h"
-
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <assert.h>
#include "fourcc.h"
#include <assert.h>
#include "fourcc.h"
@@
-54,6
+43,9
@@
/** Size of pdeq block cache. */
#define TUNE_NSAVED_PDEQS 16
/** Size of pdeq block cache. */
#define TUNE_NSAVED_PDEQS 16
+/** A size handled efficiently by malloc(), at least 1K. */
+#define PREF_MALLOC_SIZE 2048
+
/**
* Maximal number of data items in a pdeq chunk.
*/
/**
* Maximal number of data items in a pdeq chunk.
*/
@@
-97,7
+89,7
@@
static unsigned pdeqs_cached;
*
* @param p The pdeq chunk.
*/
*
* @param p The pdeq chunk.
*/
-static
INLINE
void free_pdeq_block (pdeq *p)
+static
inline
void free_pdeq_block (pdeq *p)
{
#ifndef NDEBUG
p->magic = 0xbadf00d1;
{
#ifndef NDEBUG
p->magic = 0xbadf00d1;
@@
-114,7
+106,7
@@
static INLINE void free_pdeq_block (pdeq *p)
*
* @return A new pdeq chunk.
*/
*
* @return A new pdeq chunk.
*/
-static
INLINE
pdeq *alloc_pdeq_block (void)
+static
inline
pdeq *alloc_pdeq_block (void)
{
pdeq *p;
if (TUNE_NSAVED_PDEQS && pdeqs_cached) {
{
pdeq *p;
if (TUNE_NSAVED_PDEQS && pdeqs_cached) {