summaryrefslogtreecommitdiffstats
path: root/lib/libstand/zalloc_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libstand/zalloc_defs.h')
-rw-r--r--lib/libstand/zalloc_defs.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/libstand/zalloc_defs.h b/lib/libstand/zalloc_defs.h
index 2544f59..5331ee0 100644
--- a/lib/libstand/zalloc_defs.h
+++ b/lib/libstand/zalloc_defs.h
@@ -38,20 +38,12 @@
#define DMALLOCDEBUG /* add debugging code to gather stats */
#define ZALLOCDEBUG
-#include <string.h>
+#include <sys/stdint.h>
#include "stand.h"
-
-typedef uintptr_t iaddr_t; /* unsigned int same size as pointer */
-typedef intptr_t saddr_t; /* signed int same size as pointer */
#include "zalloc_mem.h"
-#define Prototype extern
#define Library extern
-#ifndef NULL
-#define NULL ((void *)0)
-#endif
-
/*
* block extension for sbrk()
*/
@@ -60,8 +52,7 @@ typedef intptr_t saddr_t; /* signed int same size as pointer */
#define BLKEXTENDMASK (BLKEXTEND - 1)
/*
- * required malloc alignment. Use sizeof(long double) for architecture
- * independance.
+ * required malloc alignment. Just hardwire to 16.
*
* Note: if we implement a more sophisticated realloc, we should ensure that
* MALLOCALIGN is at least as large as MemNode.
@@ -72,10 +63,8 @@ typedef struct Guard {
size_t ga_Magic; /* must be at least 32 bits */
} Guard;
-#define MATYPE long double
-#define MALLOCALIGN ((sizeof(MATYPE) > sizeof(Guard)) ? sizeof(MATYPE) : sizeof(Guard))
+#define MALLOCALIGN 16
#define GAMAGIC 0x55FF44FD
#define GAFREE 0x5F54F4DF
#include "zalloc_protos.h"
-
OpenPOWER on IntegriCloud