This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] malloc: unifdef -D__STD_C
- From: Joern Engel <joern at purestorage dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Cc: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>, Joern Engel <joern at purestorage dot org>
- Date: Mon, 25 Jan 2016 16:24:44 -0800
- Subject: [PATCH] malloc: unifdef -D__STD_C
- Authentication-results: sourceware.org; auth=none
- References: <1453767942-19369-1-git-send-email-joern at purestorage dot com>
From: Joern Engel <joern@purestorage.org>
Code cleanup to improve readability.
JIRA: PURE-27597
---
tpc/malloc2.13/arena.ch | 24 ------
tpc/malloc2.13/hooks.ch | 57 -------------
tpc/malloc2.13/malloc.c | 209 ------------------------------------------------
3 files changed, 290 deletions(-)
diff --git a/tpc/malloc2.13/arena.ch b/tpc/malloc2.13/arena.ch
index 09bdf0fd26b5..b8e7c611c42c 100644
--- a/tpc/malloc2.13/arena.ch
+++ b/tpc/malloc2.13/arena.ch
@@ -465,11 +465,7 @@ __libc_malloc_pthread_startup (bool first_time)
static void
ptmalloc_init (void)
{
-#if __STD_C
const char* s;
-#else
- char* s;
-#endif
int secure = 0;
if(__malloc_initialized >= 0) return;
@@ -647,11 +643,7 @@ thread_atfork_static(ptmalloc_lock_all, ptmalloc_unlock_all, \
/* Print the complete contents of a single heap to stderr. */
static void
-#if __STD_C
dump_heap(heap_info *heap)
-#else
-dump_heap(heap) heap_info *heap;
-#endif
{
char *ptr;
mchunkptr p;
@@ -771,11 +763,7 @@ static heap_info *new_heap(size_t size, size_t top_pad)
multiple of the page size. */
static int
-#if __STD_C
grow_heap(heap_info *h, long diff)
-#else
-grow_heap(h, diff) heap_info *h; long diff;
-#endif
{
size_t page_mask = malloc_getpagesize - 1;
long new_size;
@@ -795,11 +783,7 @@ grow_heap(h, diff) heap_info *h; long diff;
/* Shrink a heap. */
static int
-#if __STD_C
shrink_heap(heap_info *h, long diff)
-#else
-shrink_heap(h, diff) heap_info *h; long diff;
-#endif
{
long new_size;
@@ -826,11 +810,7 @@ shrink_heap(h, diff) heap_info *h; long diff;
static int
internal_function
-#if __STD_C
heap_trim(heap_info *heap, size_t pad)
-#else
-heap_trim(heap, pad) heap_info *heap; size_t pad;
-#endif
{
mstate ar_ptr = heap->ar_ptr;
unsigned long pagesz = mp_.pagesize;
@@ -1026,11 +1006,7 @@ reused_arena (void)
static mstate
internal_function
-#if __STD_C
arena_get2(mstate a_tsd, size_t size)
-#else
-arena_get2(a_tsd, size) mstate a_tsd; size_t size;
-#endif
{
mstate a;
diff --git a/tpc/malloc2.13/hooks.ch b/tpc/malloc2.13/hooks.ch
index 939cb3fefd95..05cfafbb78ba 100644
--- a/tpc/malloc2.13/hooks.ch
+++ b/tpc/malloc2.13/hooks.ch
@@ -26,12 +26,7 @@
initialization routine, then do the normal work. */
static Void_t*
-#if __STD_C
malloc_hook_ini(size_t sz, const __malloc_ptr_t caller)
-#else
-malloc_hook_ini(sz, caller)
- size_t sz; const __malloc_ptr_t caller;
-#endif
{
dlmalloc_hook = NULL;
ptmalloc_init();
@@ -39,12 +34,7 @@ malloc_hook_ini(sz, caller)
}
static Void_t*
-#if __STD_C
realloc_hook_ini(Void_t* ptr, size_t sz, const __malloc_ptr_t caller)
-#else
-realloc_hook_ini(ptr, sz, caller)
- Void_t* ptr; size_t sz; const __malloc_ptr_t caller;
-#endif
{
dlmalloc_hook = NULL;
dlrealloc_hook = NULL;
@@ -53,12 +43,7 @@ realloc_hook_ini(ptr, sz, caller)
}
static Void_t*
-#if __STD_C
memalign_hook_ini(size_t alignment, size_t sz, const __malloc_ptr_t caller)
-#else
-memalign_hook_ini(alignment, sz, caller)
- size_t alignment; size_t sz; const __malloc_ptr_t caller;
-#endif
{
dlmemalign_hook = NULL;
ptmalloc_init();
@@ -110,11 +95,7 @@ dlmalloc_check_init()
static Void_t*
internal_function
-#if __STD_C
mem2mem_check(Void_t *ptr, size_t sz)
-#else
-mem2mem_check(ptr, sz) Void_t *ptr; size_t sz;
-#endif
{
mchunkptr p;
unsigned char* m_ptr = (unsigned char*)BOUNDED_N(ptr, sz);
@@ -141,11 +122,7 @@ mem2mem_check(ptr, sz) Void_t *ptr; size_t sz;
static mchunkptr
internal_function
-#if __STD_C
mem2chunk_check(Void_t* mem, unsigned char **magic_p)
-#else
-mem2chunk_check(mem, magic_p) Void_t* mem; unsigned char **magic_p;
-#endif
{
mchunkptr p;
INTERNAL_SIZE_T sz, c;
@@ -200,11 +177,7 @@ mem2chunk_check(mem, magic_p) Void_t* mem; unsigned char **magic_p;
static int
internal_function
-#if __STD_C
top_check(void)
-#else
-top_check()
-#endif
{
mchunkptr t = top(&main_arena);
char* brk, * new_brk;
@@ -247,11 +220,7 @@ top_check()
}
static Void_t*
-#if __STD_C
malloc_check(size_t sz, const Void_t *caller)
-#else
-malloc_check(sz, caller) size_t sz; const Void_t *caller;
-#endif
{
Void_t *victim;
@@ -267,11 +236,7 @@ malloc_check(sz, caller) size_t sz; const Void_t *caller;
}
static void
-#if __STD_C
free_check(Void_t* mem, const Void_t *caller)
-#else
-free_check(mem, caller) Void_t* mem; const Void_t *caller;
-#endif
{
mchunkptr p;
@@ -303,12 +268,7 @@ free_check(mem, caller) Void_t* mem; const Void_t *caller;
}
static Void_t*
-#if __STD_C
realloc_check(Void_t* oldmem, size_t bytes, const Void_t *caller)
-#else
-realloc_check(oldmem, bytes, caller)
- Void_t* oldmem; size_t bytes; const Void_t *caller;
-#endif
{
INTERNAL_SIZE_T nb;
Void_t* newmem = 0;
@@ -391,12 +351,7 @@ realloc_check(oldmem, bytes, caller)
}
static Void_t*
-#if __STD_C
memalign_check(size_t alignment, size_t bytes, const Void_t *caller)
-#else
-memalign_check(alignment, bytes, caller)
- size_t alignment; size_t bytes; const Void_t *caller;
-#endif
{
INTERNAL_SIZE_T nb;
Void_t* mem;
@@ -433,11 +388,7 @@ memalign_check(alignment, bytes, caller)
ptmalloc_init() hasn't completed yet. */
static Void_t*
-#if __STD_C
malloc_starter(size_t sz, const Void_t *caller)
-#else
-malloc_starter(sz, caller) size_t sz; const Void_t *caller;
-#endif
{
Void_t* victim;
@@ -447,11 +398,7 @@ malloc_starter(sz, caller) size_t sz; const Void_t *caller;
}
static Void_t*
-#if __STD_C
memalign_starter(size_t align, size_t sz, const Void_t *caller)
-#else
-memalign_starter(align, sz, caller) size_t align, sz; const Void_t *caller;
-#endif
{
Void_t* victim;
@@ -461,11 +408,7 @@ memalign_starter(align, sz, caller) size_t align, sz; const Void_t *caller;
}
static void
-#if __STD_C
free_starter(Void_t* mem, const Void_t *caller)
-#else
-free_starter(mem, caller) Void_t* mem; const Void_t *caller;
-#endif
{
mchunkptr p;
diff --git a/tpc/malloc2.13/malloc.c b/tpc/malloc2.13/malloc.c
index 887edcc94e56..b17b17bba4d4 100644
--- a/tpc/malloc2.13/malloc.c
+++ b/tpc/malloc2.13/malloc.c
@@ -234,13 +234,6 @@ __declspec(dllexport) void malloc2_13_bogus_symbol()
with it.
*/
-#ifndef __STD_C
-#if defined(__STDC__) || defined(__cplusplus)
-#define __STD_C 1
-#else
-#define __STD_C 0
-#endif
-#endif /*__STD_C*/
/*
@@ -248,19 +241,11 @@ __declspec(dllexport) void malloc2_13_bogus_symbol()
*/
#ifndef Void_t
-#if (__STD_C || defined(WIN32))
#define Void_t void
-#else
-#define Void_t char
-#endif
#endif /*Void_t*/
-#if __STD_C
#include <stddef.h> /* for size_t */
#include <stdlib.h> /* for getenv(), abort() */
-#else
-#include <sys/types.h>
-#endif
#include <malloc-machine.h>
@@ -561,7 +546,6 @@ Void_t *(*__morecore)(ptrdiff_t) = __default_morecore;
#endif
-#if (__STD_C || defined(HAVE_MEMCPY))
#ifdef _LIBC
# include <string.h>
@@ -569,14 +553,8 @@ Void_t *(*__morecore)(ptrdiff_t) = __default_morecore;
#ifdef WIN32
/* On Win32 memset and memcpy are already declared in windows.h */
#else
-#if __STD_C
void* memset(void*, int, size_t);
void* memcpy(void*, const void*, size_t);
-#else
-Void_t* memset();
-Void_t* memcpy();
-#endif
-#endif
#endif
#endif
@@ -596,13 +574,9 @@ Void_t* memcpy();
*/
#ifndef MALLOC_FAILURE_ACTION
-#if __STD_C
#define MALLOC_FAILURE_ACTION \
errno = ENOMEM;
-#else
-#define MALLOC_FAILURE_ACTION
-#endif
#endif
/*
@@ -612,11 +586,7 @@ Void_t* memcpy();
#ifdef LACKS_UNISTD_H
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
-#if __STD_C
extern Void_t* sbrk(ptrdiff_t);
-#else
-extern Void_t* sbrk();
-#endif
#endif
#endif
@@ -867,11 +837,7 @@ extern Void_t* sbrk();
differs across systems, but is in all cases less than the maximum
representable value of a size_t.
*/
-#if __STD_C
Void_t* public_mALLOc(size_t);
-#else
-Void_t* public_mALLOc();
-#endif
#ifdef libc_hidden_proto
libc_hidden_proto (public_mALLOc)
#endif
@@ -887,11 +853,7 @@ libc_hidden_proto (public_mALLOc)
when possible, automatically trigger operations that give
back unused memory to the system, thus reducing program footprint.
*/
-#if __STD_C
void public_fREe(Void_t*);
-#else
-void public_fREe();
-#endif
#ifdef libc_hidden_proto
libc_hidden_proto (public_fREe)
#endif
@@ -901,11 +863,7 @@ libc_hidden_proto (public_fREe)
Returns a pointer to n_elements * element_size bytes, with all locations
set to zero.
*/
-#if __STD_C
Void_t* public_cALLOc(size_t, size_t);
-#else
-Void_t* public_cALLOc();
-#endif
/*
realloc(Void_t* p, size_t n)
@@ -934,11 +892,7 @@ Void_t* public_cALLOc();
The old unix realloc convention of allowing the last-free'd chunk
to be used as an argument to realloc is not supported.
*/
-#if __STD_C
Void_t* public_rEALLOc(Void_t*, size_t);
-#else
-Void_t* public_rEALLOc();
-#endif
#ifdef libc_hidden_proto
libc_hidden_proto (public_rEALLOc)
#endif
@@ -955,11 +909,7 @@ libc_hidden_proto (public_rEALLOc)
Overreliance on memalign is a sure way to fragment space.
*/
-#if __STD_C
Void_t* public_mEMALIGn(size_t, size_t);
-#else
-Void_t* public_mEMALIGn();
-#endif
#ifdef libc_hidden_proto
libc_hidden_proto (public_mEMALIGn)
#endif
@@ -969,11 +919,7 @@ libc_hidden_proto (public_mEMALIGn)
Equivalent to memalign(pagesize, n), where pagesize is the page
size of the system. If the pagesize is unknown, 4096 is used.
*/
-#if __STD_C
Void_t* public_vALLOc(size_t);
-#else
-Void_t* public_vALLOc();
-#endif
@@ -998,11 +944,7 @@ Void_t* public_vALLOc();
M_MMAP_THRESHOLD -3 128*1024 any (or 0 if no MMAP support)
M_MMAP_MAX -4 65536 any (0 disables use of mmap)
*/
-#if __STD_C
int public_mALLOPt(int, int);
-#else
-int public_mALLOPt();
-#endif
/*
@@ -1028,11 +970,7 @@ int public_mALLOPt();
be kept as longs, the reported values may wrap around zero and
thus be inaccurate.
*/
-#if __STD_C
struct mallinfo public_mALLINFo(void);
-#else
-struct mallinfo public_mALLINFo();
-#endif
#ifndef _LIBC
/*
@@ -1087,11 +1025,7 @@ struct mallinfo public_mALLINFo();
return first;
}
*/
-#if __STD_C
Void_t** public_iCALLOc(size_t, size_t, Void_t**);
-#else
-Void_t** public_iCALLOc();
-#endif
/*
independent_comalloc(size_t n_elements, size_t sizes[], Void_t* chunks[]);
@@ -1152,11 +1086,7 @@ Void_t** public_iCALLOc();
since it cannot reuse existing noncontiguous small chunks that
might be available for some of the elements.
*/
-#if __STD_C
Void_t** public_iCOMALLOc(size_t, size_t*, Void_t**);
-#else
-Void_t** public_iCOMALLOc();
-#endif
#endif /* _LIBC */
@@ -1166,11 +1096,7 @@ Void_t** public_iCOMALLOc();
Equivalent to valloc(minimum-page-that-holds(n)), that is,
round up n to nearest pagesize.
*/
-#if __STD_C
Void_t* public_pVALLOc(size_t);
-#else
-Void_t* public_pVALLOc();
-#endif
/*
cfree(Void_t* p);
@@ -1180,11 +1106,7 @@ Void_t* public_pVALLOc();
for odd historical reasons (such as: cfree is used in example
code in the first edition of K&R).
*/
-#if __STD_C
void public_cFREe(Void_t*);
-#else
-void public_cFREe();
-#endif
/*
malloc_trim(size_t pad);
@@ -1210,11 +1132,7 @@ void public_cFREe();
On systems that do not support "negative sbrks", it will always
return 0.
*/
-#if __STD_C
int public_mTRIm(size_t);
-#else
-int public_mTRIm();
-#endif
/*
malloc_usable_size(Void_t* p);
@@ -1231,11 +1149,7 @@ int public_mTRIm();
assert(malloc_usable_size(p) >= 256);
*/
-#if __STD_C
size_t public_mUSABLe(Void_t*);
-#else
-size_t public_mUSABLe();
-#endif
/*
malloc_stats();
@@ -1257,11 +1171,7 @@ size_t public_mUSABLe();
More information can be obtained by calling mallinfo.
*/
-#if __STD_C
void public_mSTATs(void);
-#else
-void public_mSTATs();
-#endif
/*
malloc_get_state(void);
@@ -1269,11 +1179,7 @@ void public_mSTATs();
Returns the state of all malloc variables in an opaque data
structure.
*/
-#if __STD_C
Void_t* public_gET_STATe(void);
-#else
-Void_t* public_gET_STATe();
-#endif
/*
malloc_set_state(Void_t* state);
@@ -1281,11 +1187,7 @@ Void_t* public_gET_STATe();
Restore the state of all malloc variables from data obtained with
malloc_get_state().
*/
-#if __STD_C
int public_sET_STATe(Void_t*);
-#else
-int public_sET_STATe();
-#endif
#if defined(_LIBC) || defined(PURE_HACK)
/*
@@ -1625,7 +1527,6 @@ struct mallinfo2 {
/* Internal routines. */
-#if __STD_C
static Void_t* _int_malloc(mstate, size_t);
#ifdef ATOMIC_FASTBINS
@@ -1681,24 +1582,6 @@ static Void_t* malloc_atfork(size_t sz, const Void_t *caller);
static void free_atfork(Void_t* mem, const Void_t *caller);
#endif
-#else
-
-static Void_t* _int_malloc();
-static void _int_free();
-static Void_t* _int_realloc();
-static Void_t* _int_memalign();
-static Void_t* _int_valloc();
-static Void_t* _int_pvalloc();
-/*static Void_t* cALLOc();*/
-static Void_t** _int_icalloc();
-static Void_t** _int_icomalloc();
-static int mTRIm();
-static size_t mUSABLe();
-static void mSTATs();
-static int mALLOPt();
-static struct mallinfo2 mALLINFo();
-
-#endif
@@ -2480,11 +2363,7 @@ static INTERNAL_SIZE_T global_max_fast;
optimization at all. (Inlining it in malloc_consolidate is fine though.)
*/
-#if __STD_C
static void malloc_init_state(mstate av)
-#else
-static void malloc_init_state(av) mstate av;
-#endif
{
int i;
mbinptr bin;
@@ -2510,19 +2389,12 @@ static void malloc_init_state(av) mstate av;
Other internal utilities operating on mstates
*/
-#if __STD_C
static Void_t* sYSMALLOc(INTERNAL_SIZE_T, mstate);
static int sYSTRIm(size_t, mstate);
static void malloc_consolidate(mstate);
#ifndef _LIBC
static Void_t** iALLOc(mstate, size_t, size_t*, int, Void_t**);
#endif
-#else
-static Void_t* sYSMALLOc();
-static int sYSTRIm();
-static void malloc_consolidate();
-static Void_t** iALLOc();
-#endif
/* -------------- Early definitions for debugging hooks ---------------- */
@@ -2613,11 +2485,7 @@ static int perturb_byte;
Properties of all chunks
*/
-#if __STD_C
static void do_check_chunk(mstate av, mchunkptr p)
-#else
-static void do_check_chunk(av, p) mstate av; mchunkptr p;
-#endif
{
unsigned long sz = chunksize(p);
/* min and max possible addresses assuming contiguous allocation */
@@ -2662,11 +2530,7 @@ static void do_check_chunk(av, p) mstate av; mchunkptr p;
Properties of free chunks
*/
-#if __STD_C
static void do_check_free_chunk(mstate av, mchunkptr p)
-#else
-static void do_check_free_chunk(av, p) mstate av; mchunkptr p;
-#endif
{
INTERNAL_SIZE_T sz = p->size & ~(PREV_INUSE|NON_MAIN_ARENA);
mchunkptr next = chunk_at_offset(p, sz);
@@ -2700,11 +2564,7 @@ static void do_check_free_chunk(av, p) mstate av; mchunkptr p;
Properties of inuse chunks
*/
-#if __STD_C
static void do_check_inuse_chunk(mstate av, mchunkptr p)
-#else
-static void do_check_inuse_chunk(av, p) mstate av; mchunkptr p;
-#endif
{
mchunkptr next;
@@ -2741,12 +2601,7 @@ static void do_check_inuse_chunk(av, p) mstate av; mchunkptr p;
Properties of chunks recycled from fastbins
*/
-#if __STD_C
static void do_check_remalloced_chunk(mstate av, mchunkptr p, INTERNAL_SIZE_T s)
-#else
-static void do_check_remalloced_chunk(av, p, s)
-mstate av; mchunkptr p; INTERNAL_SIZE_T s;
-#endif
{
INTERNAL_SIZE_T sz = p->size & ~(PREV_INUSE|NON_MAIN_ARENA);
@@ -2774,12 +2629,7 @@ mstate av; mchunkptr p; INTERNAL_SIZE_T s;
Properties of nonrecycled chunks at the point they are malloced
*/
-#if __STD_C
static void do_check_malloced_chunk(mstate av, mchunkptr p, INTERNAL_SIZE_T s)
-#else
-static void do_check_malloced_chunk(av, p, s)
-mstate av; mchunkptr p; INTERNAL_SIZE_T s;
-#endif
{
/* same as recycled case ... */
do_check_remalloced_chunk(av, p, s);
@@ -2976,11 +2826,7 @@ static void do_check_malloc_state(mstate av)
be extended or replaced.
*/
-#if __STD_C
static Void_t* sYSMALLOc(INTERNAL_SIZE_T nb, mstate av)
-#else
-static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
-#endif
{
mchunkptr old_top; /* incoming value of av->top */
INTERNAL_SIZE_T old_size; /* its size */
@@ -3464,11 +3310,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
returns 1 if it actually released any memory, else 0.
*/
-#if __STD_C
static int sYSTRIm(size_t pad, mstate av)
-#else
-static int sYSTRIm(pad, av) size_t pad; mstate av;
-#endif
{
long top_size; /* Amount of top-most memory */
long extra; /* Amount to release */
@@ -3529,11 +3371,7 @@ static int sYSTRIm(pad, av) size_t pad; mstate av;
static void
internal_function
-#if __STD_C
munmap_chunk(mchunkptr p)
-#else
-munmap_chunk(p) mchunkptr p;
-#endif
{
INTERNAL_SIZE_T size = chunksize(p);
@@ -3570,11 +3408,7 @@ munmap_chunk(p) mchunkptr p;
static mchunkptr
internal_function
-#if __STD_C
mremap_chunk(mchunkptr p, size_t new_size)
-#else
-mremap_chunk(p, new_size) mchunkptr p; size_t new_size;
-#endif
{
size_t page_mask = mp_.pagesize - 1;
INTERNAL_SIZE_T offset = p->prev_size;
@@ -5111,11 +4945,7 @@ _int_free(mstate av, mchunkptr p)
initialization code.
*/
-#if __STD_C
static void malloc_consolidate(mstate av)
-#else
-static void malloc_consolidate(av) mstate av;
-#endif
{
mfastbinptr* fb; /* current fastbin being consolidated */
mfastbinptr* maxfb; /* last fastbin (for loop control) */
@@ -5589,11 +5419,7 @@ _int_memalign(mstate av, size_t alignment, size_t bytes)
------------------------------ calloc ------------------------------
*/
-#if __STD_C
Void_t* cALLOc(size_t n_elements, size_t elem_size)
-#else
-Void_t* cALLOc(n_elements, elem_size) size_t n_elements; size_t elem_size;
-#endif
{
mchunkptr p;
unsigned long clearsize;
@@ -5652,12 +5478,7 @@ Void_t* cALLOc(n_elements, elem_size) size_t n_elements; size_t elem_size;
*/
Void_t**
-#if __STD_C
_int_icalloc(mstate av, size_t n_elements, size_t elem_size, Void_t* chunks[])
-#else
-_int_icalloc(av, n_elements, elem_size, chunks)
-mstate av; size_t n_elements; size_t elem_size; Void_t* chunks[];
-#endif
{
size_t sz = elem_size; /* serves as 1-element array */
/* opts arg of 3 means all elements are same size, and should be cleared */
@@ -5669,12 +5490,7 @@ mstate av; size_t n_elements; size_t elem_size; Void_t* chunks[];
*/
Void_t**
-#if __STD_C
_int_icomalloc(mstate av, size_t n_elements, size_t sizes[], Void_t* chunks[])
-#else
-_int_icomalloc(av, n_elements, sizes, chunks)
-mstate av; size_t n_elements; size_t sizes[]; Void_t* chunks[];
-#endif
{
return iALLOc(av, n_elements, sizes, 0, chunks);
}
@@ -5692,12 +5508,7 @@ mstate av; size_t n_elements; size_t sizes[]; Void_t* chunks[];
static Void_t**
-#if __STD_C
iALLOc(mstate av, size_t n_elements, size_t* sizes, int opts, Void_t* chunks[])
-#else
-iALLOc(av, n_elements, sizes, opts, chunks)
-mstate av; size_t n_elements; size_t* sizes; int opts; Void_t* chunks[];
-#endif
{
INTERNAL_SIZE_T element_size; /* chunksize of each element, if all same */
INTERNAL_SIZE_T contents_size; /* total size of elements */
@@ -5818,11 +5629,7 @@ mstate av; size_t n_elements; size_t* sizes; int opts; Void_t* chunks[];
*/
static Void_t*
-#if __STD_C
_int_valloc(mstate av, size_t bytes)
-#else
-_int_valloc(av, bytes) mstate av; size_t bytes;
-#endif
{
/* Ensure initialization/consolidation */
if (have_fastchunks(av)) malloc_consolidate(av);
@@ -5835,11 +5642,7 @@ _int_valloc(av, bytes) mstate av; size_t bytes;
static Void_t*
-#if __STD_C
_int_pvalloc(mstate av, size_t bytes)
-#else
-_int_pvalloc(av, bytes) mstate av, size_t bytes;
-#endif
{
size_t pagesz;
@@ -5854,11 +5657,7 @@ _int_pvalloc(av, bytes) mstate av, size_t bytes;
------------------------------ malloc_trim ------------------------------
*/
-#if __STD_C
static int mTRIm(mstate av, size_t pad)
-#else
-static int mTRIm(av, pad) mstate av; size_t pad;
-#endif
{
/* Ensure initialization/consolidation */
malloc_consolidate (av);
@@ -5917,11 +5716,7 @@ static int mTRIm(av, pad) mstate av; size_t pad;
------------------------- malloc_usable_size -------------------------
*/
-#if __STD_C
size_t mUSABLe(Void_t* mem)
-#else
-size_t mUSABLe(mem) Void_t* mem;
-#endif
{
mchunkptr p;
if (mem != 0) {
@@ -6069,11 +5864,7 @@ void mSTATs()
------------------------------ mallopt ------------------------------
*/
-#if __STD_C
int mALLOPt(int param_number, int value)
-#else
-int mALLOPt(param_number, value) int param_number; int value;
-#endif
{
mstate av = &main_arena;
int res = 1;
--
2.7.0.rc3