diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-08-30 15:01:38 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-10-01 09:55:07 +0200 |
commit | a314544a278f1533ae001f742d7fe24fcee253e6 (patch) | |
tree | 64b5cec3ddc5111df8f229fdbd57376d66195043 /testsuites/libtests/record02/init.c | |
parent | MAINTAINERS: Remove Martin Galvan (diff) | |
download | rtems-a314544a278f1533ae001f742d7fe24fcee253e6.tar.bz2 |
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.
Diffstat (limited to 'testsuites/libtests/record02/init.c')
-rw-r--r-- | testsuites/libtests/record02/init.c | 23 |
1 files changed, 22 insertions, 1 deletions
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 <rtems/recordclient.h> #include <rtems.h> +#include <stdlib.h> #include <string.h> #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 |