https://bugs.kde.org/show_bug.cgi?id=407589
Paul Floyd changed:
What|Removed |Added
Status|REPORTED|RESOLVED
Resolution|---
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #11 from Paul Floyd ---
The fix for aligned_alloc is likely to land along with support for FreeBSD. I
will close this item then. If you feel that there is a strong need for
reallocarray please open a new item and I'll take a look.
--
You
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #10 from Paul Floyd ---
Currently, in practice I don't see much benefit in adding reallocarray.
The glibc implementation just uses realloc:
https://code.woboq.org/userspace/glibc/malloc/reallocarray.c.html
So does the FreeBSD
https://bugs.kde.org/show_bug.cgi?id=407589
Paul Floyd changed:
What|Removed |Added
Assignee|jsew...@acm.org |pa...@free.fr
--
You are receiving this mail
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #9 from Paul Floyd ---
Even more finally, this patch is worthwhile on FreeBSD.
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #8 from Paul Floyd ---
Finally, I did start writing some regression tests, for instance
// example from here https://en.cppreference.com/w/c/memory/aligned_alloc
#include
#include
int main(void)
{
int *p1 = malloc(10*sizeof *p1);
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #7 from Paul Floyd ---
Created attachment 127060
--> https://bugs.kde.org/attachment.cgi?id=127060=edit
Patch for algned_alloc support
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #6 from Paul Floyd ---
I'll look at reallocarray another day on FreeBSD (not a high priority for me).
For aligned_alloc, I don't think that this will work well. The problem is that
aligned_alloc and and memalign alias the same function on
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #5 from Paul Floyd ---
A more authoritative reference
https://en.cppreference.com/w/c/memory/aligned_alloc
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=407589
Paul Floyd changed:
What|Removed |Added
CC||pa...@free.fr
--- Comment #4 from Paul Floyd ---
https://bugs.kde.org/show_bug.cgi?id=407589
Yann Droneaud changed:
What|Removed |Added
CC||y...@droneaud.fr
--
You are receiving this
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #3 from Yann Droneaud ---
More about those functions in glibc documentation:
http://www.gnu.org/software/libc/manual/html_node/Summary-of-Malloc.html
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #2 from Yann Droneaud ---
(In reply to Yann Droneaud from comment #0)
> But it doesn't have explicit support for C11 aligned allocation function:
>
> - void *aligned_alloc (size_t alignment, size_t size);
>
Correct link:
https://bugs.kde.org/show_bug.cgi?id=407589
--- Comment #1 from Yann Droneaud ---
(In reply to Yann Droneaud from comment #0)
> And GNU reallocate array function:
>
> - void *reallocarray (void *ptr, size_t nmemb, size_t size);
>
> http://man7.org/linux/man-pages/man3/reallocarray.3.html
14 matches
Mail list logo