[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Wget-dev] wget2 | Make wget allocation functions overridable functi
From: |
Darshit Shah |
Subject: |
Re: [Wget-dev] wget2 | Make wget allocation functions overridable function pointers (d5e648e8) |
Date: |
Tue, 18 Jun 2019 20:56:44 +0000 |
Darshit Shah started a new discussion on libwget/xalloc.c:
https://gitlab.com/gnuwget/wget2/commit/d5e648e82bf41da724ff3b613a60b6dd9493d80a#note_182771145
> - * This function is like free().
> - *
> - * It is basically needed on systems where the library malloc heap is
> different
> - * from the caller's malloc heap, which happens on Windows when the library
> - * is a separate DLL.
> - *
> - * To prevent typical use-after-free issues, use the macro wget_xfree().
> - */
> -void wget_free(void *ptr)
> -{
> - free(ptr);
> -}
> +wget_malloc_function wget_malloc = malloc;
> +wget_calloc_function wget_calloc = calloc;
> +wget_realloc_function wget_realloc = realloc;
> +wget_free_function wget_free = free;
Can we have these definitions in `include/wget/wget.h`? It allows the user to
see the defaults easily.
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/commit/d5e648e82bf41da724ff3b613a60b6dd9493d80a#note_182771145
You're receiving this email because of your account on gitlab.com.
- Re: [Wget-dev] wget2 | Make wget allocation functions overridable function pointers (d5e648e8),
Darshit Shah <=