implemented memory_identifier in memory

added it to every node
This commit is contained in:
Václav Šmejkal 2023-02-02 16:37:04 +01:00
parent b36bf1a850
commit 1b9d0a04d8
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -9,10 +9,13 @@
#include <stdlib.h>
#include <string.h>
#include <why2/flags.h>
//LOCAL
typedef struct node
{
void *pointer;
char *identifier;
struct node *next;
} node_t; //SINGLE LINKED LIST
@ -25,6 +28,7 @@ void push_to_list(void *pointer)
node_t *buffer = head;
new_node -> pointer = pointer;
new_node -> identifier = why2_get_memory_identifier();
new_node -> next = NULL;
if (head == NULL) //INIT LIST