From b6a8c856ced8b6a1b8e9a43fa20826e0aa2ddf0c Mon Sep 17 00:00:00 2001 From: tsukumijima Date: Sat, 23 Oct 2021 16:46:19 +0900 Subject: [PATCH] =?UTF-8?q?CMake=20=E3=81=A7=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=A8=E3=82=B9=E3=82=AF=E3=83=A9=E3=83=B3?= =?UTF-8?q?=E3=83=96=E3=83=AB=E8=A7=A3=E9=99=A4=E3=81=AB=E5=A4=B1=E6=95=97?= =?UTF-8?q?=E3=81=99=E3=82=8B=E4=B8=8D=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20Windows=20=E5=90=91=E3=81=91=20SIMD=20=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C=E7=94=A8=E3=81=AE=20mem=5Faligned=5Falloc()=20?= =?UTF-8?q?=E3=81=8C=20CMake=20(Linux)=20=E3=81=A0=E3=81=A8=E3=81=86?= =?UTF-8?q?=E3=81=BE=E3=81=8F=E5=8B=95=E3=81=8B=E3=81=AA=E3=81=84=E3=82=89?= =?UTF-8?q?=E3=81=97=E3=81=84=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aribb25/arib_std_b25.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/aribb25/arib_std_b25.c b/aribb25/arib_std_b25.c index ee25af4..4a0e5b3 100644 --- a/aribb25/arib_std_b25.c +++ b/aribb25/arib_std_b25.c @@ -2867,8 +2867,11 @@ static int reserve_work_buffer(TS_WORK_BUFFER *buf, intptr_t size) n += n; } - //p = (uint8_t *)malloc(n); +#ifdef ENABLE_MULTI2_SIMD p = (uint8_t *)mem_aligned_alloc(n); +#else + p = (uint8_t *)malloc(n); +#endif if(p == NULL){ return 0; } @@ -2879,8 +2882,11 @@ static int reserve_work_buffer(TS_WORK_BUFFER *buf, intptr_t size) if(m > 0){ memcpy(p, buf->head, m); } - //free(buf->pool); +#ifdef ENABLE_MULTI2_SIMD mem_aligned_free(buf->pool); +#else + free(buf->pool); +#endif buf->pool = NULL; } @@ -2924,8 +2930,11 @@ static void reset_work_buffer(TS_WORK_BUFFER *buf) static void release_work_buffer(TS_WORK_BUFFER *buf) { if(buf->pool != NULL){ - //free(buf->pool); +#ifdef ENABLE_MULTI2_SIMD mem_aligned_free(buf->pool); +#else + free(buf->pool); +#endif } buf->pool = NULL; buf->head = NULL;