curl/lib/curlx
Viktor Szakats 4e051ff550
curlx: limit use of system allocators to the minimum possible
Clone a multibye conversion function into curlx/fopen, and use that
local copy from curlx/fopen functions. Adjust allocators in curlx/fopen
to use curl's in normal builds, and system allocators in TrackMemory
builds to avoid recursion.

This allows to switch curlx/multibyte functions to curl allocators in
all configurations, as they are no longer called by curlx/fopen, and
a recursive call can no longer happen.

After this patch the system allocator is only used in TrackMemory
Windows builds, within curlx `fopen`, `freopen`, `stat` and `open`
functions.

Also:
- test 1, 440, 767: raise allocation limitsto fit the extra allocations
  in Windows Unicode builds.
- replace all uses of `curlx_unicodefree()` macro with `curlx_free()`
  across the codebase.
- curlx/multibyte: delete `curlx_unicodefree()`.
- ldap: join Windows and non-Windows codepaths that became
  identical after moving from `curlx_unicodefree()` to `curlx_free()`.
- vauth: drop a strdup from standard to curl allocator since
  the original allocation is now already done by curl's.
- tool_doswin: drop now superfluous strdup from `FindWin32CACert()`.
- memanalyzer.pm: sync weirdo `calloc` log message with `malloc`'s.

Fixes #19748
Closes #19845
2025-12-05 15:32:59 +01:00
..
base64.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
base64.h curlx_base64_encode: use uint8_t* for input 2025-11-27 14:35:01 +01:00
binmode.h lib: make CURLX_SET_BINMODE() and use it 2025-06-19 15:57:37 +02:00
curlx.h curlx: limit use of system allocators to the minimum possible 2025-12-05 15:32:59 +01:00
dynbuf.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
dynbuf.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
fopen.c curlx: limit use of system allocators to the minimum possible 2025-12-05 15:32:59 +01:00
fopen.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
inet_ntop.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
inet_ntop.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
inet_pton.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
inet_pton.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
multibyte.c curlx: limit use of system allocators to the minimum possible 2025-12-05 15:32:59 +01:00
multibyte.h curlx: limit use of system allocators to the minimum possible 2025-12-05 15:32:59 +01:00
nonblock.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
nonblock.h curlx: move nonblock.[ch] into curlx/ 2025-05-08 13:22:02 +02:00
snprintf.h curlx: replace sprintf with snprintf 2025-11-25 11:11:06 +01:00
strerr.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
strerr.h curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
strparse.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
strparse.h tidy-up: whitespace 2025-07-11 13:32:54 +02:00
timediff.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
timediff.h curlx: move into to curlx/ 2025-05-07 11:01:15 +02:00
timeval.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
timeval.h lib: rename curlx_timediff to curlx_timeleft_ms 2025-11-13 13:12:58 +01:00
version_win32.c build: stop overriding standard memory allocation functions 2025-11-28 10:44:26 +01:00
version_win32.h curlx: move version_win32.[ch] to curlx/ 2025-05-08 17:09:32 +02:00
wait.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
wait.h lib: make curlx_wait_ms() and use it 2025-06-19 15:57:37 +02:00
warnless.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
warnless.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
winapi.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
winapi.h windows: use native error code types more 2025-10-06 12:12:44 +02:00