X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2F_dlmalloc%2Fdlmalloc.c;h=33e393bbfdd311be1aa2ee4108d354483b77d2b2;hp=54703d480f5c5e89acf656a0f11c6a691930c107;hb=8894c921674bb116d0a7b8f23a55311e7a768019;hpb=ed26bf80a4713c6b1f158571f3090f4cbb2d64f7 diff --git a/functions/_dlmalloc/dlmalloc.c b/functions/_dlmalloc/dlmalloc.c index 54703d4..33e393b 100644 --- a/functions/_dlmalloc/dlmalloc.c +++ b/functions/_dlmalloc/dlmalloc.c @@ -893,20 +893,6 @@ DLMALLOC_EXPORT void* dlcalloc(size_t, size_t); */ DLMALLOC_EXPORT void* dlrealloc(void*, size_t); -/* - memalign(size_t alignment, size_t n); - Returns a pointer to a newly allocated chunk of n bytes, aligned - in accord with the alignment argument. - - The alignment argument should be a power of two. If the argument is - not a power of two, the nearest greater power is used. - 8-byte alignment is guaranteed by normal malloc calls, so don't - bother calling memalign with an argument of 8 or less. - - Overreliance on memalign is a sure way to fragment space. -*/ -DLMALLOC_EXPORT void* dlmemalign(size_t, size_t); - #endif /* @@ -924,6 +910,24 @@ DLMALLOC_EXPORT void* dlmemalign(size_t, size_t); */ DLMALLOC_EXPORT void* dlrealloc_in_place(void*, size_t); +#if 0 // Redeclaration warnings as PDCLib already declares these in + +/* + memalign(size_t alignment, size_t n); + Returns a pointer to a newly allocated chunk of n bytes, aligned + in accord with the alignment argument. + + The alignment argument should be a power of two. If the argument is + not a power of two, the nearest greater power is used. + 8-byte alignment is guaranteed by normal malloc calls, so don't + bother calling memalign with an argument of 8 or less. + + Overreliance on memalign is a sure way to fragment space. +*/ +DLMALLOC_EXPORT void* dlmemalign(size_t, size_t); + +#endif + /* int posix_memalign(void** pp, size_t alignment, size_t n); Allocates a chunk of n bytes, aligned in accord with the alignment