diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2025-04-24 21:23:06 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2025-04-25 11:48:09 +0000 |
| commit | 846229d60b4fd6def666ce32cfc475ed96aabaf3 (patch) | |
| tree | 1b9161505d2fa80501d3ba4cd2298f23ae4167de /lib/libthr | |
| parent | 736e2ab5ef3c84dc9c08351822ff2d8473ae5330 (diff) | |
Diffstat (limited to 'lib/libthr')
| -rw-r--r-- | lib/libthr/thread/thr_malloc.c | 13 | ||||
| -rw-r--r-- | lib/libthr/thread/thr_private.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_malloc.c b/lib/libthr/thread/thr_malloc.c index 9a81d6d1bd6b..48af9d1ea929 100644 --- a/lib/libthr/thread/thr_malloc.c +++ b/lib/libthr/thread/thr_malloc.c @@ -120,6 +120,19 @@ __thr_malloc(size_t nbytes) } void * +__thr_aligned_alloc_offset(size_t align, size_t size, size_t offset) +{ + struct pthread *curthread; + void *res; + + curthread = _get_curthread(); + thr_malloc_lock(curthread); + res = __crt_aligned_alloc_offset(align, size, offset); + thr_malloc_unlock(curthread); + return (res); +} + +void * __thr_realloc(void *cp, size_t nbytes) { struct pthread *curthread; diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 926e868293cd..dc5be08a0760 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -1014,6 +1014,7 @@ void __thr_pshared_destroy(void *key) __hidden; void __thr_pshared_atfork_pre(void) __hidden; void __thr_pshared_atfork_post(void) __hidden; +void *__thr_aligned_alloc_offset(size_t align, size_t size, size_t offset); void *__thr_calloc(size_t num, size_t size); void __thr_free(void *cp); void *__thr_malloc(size_t nbytes); |
