14 while (NULL != pllist_p) {
15 fprintf(stderr,
"p %p/%p\n", (
void *) pllist_p,
16 (
void *) pllist_p->
ptr);
17 pllist_p = pllist_p->
next;
72 for (i = 0; i < (5 * 7); ++i) {
73 assert(0 == tmp_p[i]);
100 assert(pary_pllist[0]->
ptr == pary_mem[0]);
101 assert(NULL == pary_pllist[0]->
next);
103 fprintf(stdout,
"\n");
108 assert(pary_pllist[1]->
ptr == pary_mem[1]);
109 assert(pary_pllist[0] == pary_pllist[1]->
next);
110 assert(pary_pllist[0]->
ptr == pary_mem[0]);
111 assert(NULL == pary_pllist[0]->
next);
113 fprintf(stdout,
"\n");
118 assert(pary_pllist[2]->
ptr == pary_mem[2]);
119 assert(pary_pllist[1] == pary_pllist[2]->
next);
120 assert(pary_pllist[1]->
ptr == pary_mem[1]);
121 assert(pary_pllist[0] == pary_pllist[1]->
next);
122 assert(pary_pllist[0]->
ptr == pary_mem[0]);
123 assert(NULL == pary_pllist[0]->
next);
125 fprintf(stdout,
"\n");
134 int main(
int argc,
char *argv[])
137 fprintf(stderr,
"Usage: %s test_id\n", argv[0]);
141 switch (argv[1][0]) {
155 fprintf(stderr,
"Invalid test_id: %s \n", argv[1]);
static void test_client_memope_malloc(void)
Check normal termination when there is one malloc.
int main(int argc, char *argv[])
static void test_client_memope_multi(void)
Check normal termination when there are multiple memory allocations.
void hipcClientTerminate(struct HIPC_client *const cl_p)
Terminates a HIPC client with releasing the memory space that the client has.
static void print_pllist(FILE *fp, struct HIPC_ptr_link_list const *pllist_p)
static void * hipcClientCalloc(struct HIPC_client *const cl_p, size_t nmemb, size_t size)
Allocates memory by using calloc.
static void test_client_memope_no_allocation(void)
Check normal termination when there is no memory allocation.
static void * hipcClientMalloc(struct HIPC_client *const cl_p, size_t size)
Allocates memory by using malloc.
struct HIPC_ptr_link_list * pllist_p
static void test_client_memope_calloc(void)
Check normal termination when there is one calloc.
struct HIPC_ptr_link_list * next