From a314544a278f1533ae001f742d7fe24fcee253e6 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 30 Aug 2019 15:01:38 +0200 Subject: record: Add wrappers for malloc() functions Introduce new library librtemsrecordwrap.a which contains wrappers for operating system functions which produce entry/exit events. The wrappers can be selected during link time via the GNU ld --wrap option. Update #3665. --- testsuites/libtests/record02/init.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'testsuites/libtests/record02/init.c') diff --git a/testsuites/libtests/record02/init.c b/testsuites/libtests/record02/init.c index 22671a7c0a..220e240d60 100644 --- a/testsuites/libtests/record02/init.c +++ b/testsuites/libtests/record02/init.c @@ -33,6 +33,7 @@ #include #include +#include #include #include "tmacros.h" @@ -94,6 +95,24 @@ static void drain_visitor( rtems_test_assert(cs == RTEMS_RECORD_CLIENT_SUCCESS); } +static void call_malloc_functions(void) +{ + void *p; + int eno; + + p = aligned_alloc(1, 1); + free(p); + p = calloc(1, 1); + free(p); + p = malloc(1); + free(p); + eno = posix_memalign(&p, 32, 32); + rtems_test_assert(eno == 0); + free(p); + p = realloc(NULL, 1); + free(p); +} + static void Init(rtems_task_argument arg) { test_context *ctx; @@ -161,6 +180,8 @@ static void Init(rtems_task_argument arg) level = rtems_record_interrupt_disable(); rtems_record_interrupt_enable(level); + call_malloc_functions(); + rtems_record_client_init(&ctx->client, client_handler, NULL); size = _Record_Stream_header_initialize(&header); cs = rtems_record_client_run(&ctx->client, &header, size); @@ -182,7 +203,7 @@ static void Init(rtems_task_argument arg) #define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_RECORD_PER_PROCESSOR_ITEMS 256 +#define CONFIGURE_RECORD_PER_PROCESSOR_ITEMS 512 #define CONFIGURE_RECORD_EXTENSIONS_ENABLED -- cgit v1.2.3