[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'ssfmalloc'
From: |
Bruno Haible |
Subject: |
Re: new module 'ssfmalloc' |
Date: |
Mon, 02 Nov 2020 01:39:17 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-193-generic; KDE/5.18.0; x86_64; ; ) |
Two more portability fixes are needed:
- On Linux/SPARC, UCHAR_MAX is not defined unless <limits.h> is included.
- On Linux/PowerPC, getpagetsize() returns 65536, which is unusually large.
2020-11-01 Bruno Haible <bruno@clisp.org>
ssfmalloc tests: Portability to Linux/PowerPC and Linux/SPARC.
* tests/test-ssfmalloc.c: Include <limits.h>.
(PAGESIZE_MAX): Set to 65536 on Linux/PowerPC.
diff --git a/tests/test-ssfmalloc.c b/tests/test-ssfmalloc.c
index 9699e6b..86fa42b 100644
--- a/tests/test-ssfmalloc.c
+++ b/tests/test-ssfmalloc.c
@@ -124,9 +124,9 @@ free_pages (uintptr_t pages, size_t size)
/* ======================= Instantiate the front end ======================= */
#define PAGESIZE pagesize
-/* On Cygwin, PAGESIZE is 65536. On all other platforms, it is either 4096
- or 8192. */
-#ifdef __CYGWIN__
+/* On Cygwin and Linux/PowerPC, PAGESIZE is 65536. On all other platforms, it
+ is either 4096 or 8192. */
+#if defined __CYGWIN__ || (defined __linux__ && defined __powerpc__)
# define PAGESIZE_MAX 65536
#else
# define PAGESIZE_MAX 8192
@@ -141,6 +141,8 @@ free_pages (uintptr_t pages, size_t size)
/* ================================= Tests ================================= */
+#include <limits.h>
+
#include "macros.h"
/* Fills a block of a given size with some contents. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: new module 'ssfmalloc',
Bruno Haible <=