Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(C Language) I need help with this question. Please write the header file and the c file for this question please. Don't change any variable

(C Language) I need help with this question. Please write the header file and the c file for this question please. Don't change any variable names if applicable and please follow the instructions very carefully. Make sure there are no errors too please.

image text in transcribed

image text in transcribed

Linked List Memory Checkeir UPDATIE When I first created this assignment, I asked you to work the the reallocf and valloc functions in addition to calloc, free, malloc ard realloc. The first two functions are not standard so, I have removed them from the assignment requirements Introduction For this assignment, you will be writing a set of functions and a header file that analyzes the dynamic memory used by a program. You will not be writing the main file. Your program will check each calloc, free, malloc, realloc, realleef, and wallee. It will keep track of all the addresses of allocated memory, until they are freed. If, at any point, a memory address is freed that was not allocated, an error message will be printed. At the end of the program, an error message will be printed for each memory address that was allocated but not freed. Include The test programs that will be used to try out your functions and header file will be included in a single *.c file. This file will be compiled with the, "-include memcheck.h" option and the file "memcheck.c" will be added to the compile inputs. Of course, we will use the usual "-Wall -ansi-pedantic" options. You will provide (by uploading to git) the files "nemcheck.h and memcheck.c Your mencheck.h file will include 7 #detine directives that replace the calloc free malloc realloc, fe ee ee and main unctions in the and memcheck_main, respectively, as well as the prototypes for your own memcheck_* functions. Linked List Memory Checkeir UPDATIE When I first created this assignment, I asked you to work the the reallocf and valloc functions in addition to calloc, free, malloc ard realloc. The first two functions are not standard so, I have removed them from the assignment requirements Introduction For this assignment, you will be writing a set of functions and a header file that analyzes the dynamic memory used by a program. You will not be writing the main file. Your program will check each calloc, free, malloc, realloc, realleef, and wallee. It will keep track of all the addresses of allocated memory, until they are freed. If, at any point, a memory address is freed that was not allocated, an error message will be printed. At the end of the program, an error message will be printed for each memory address that was allocated but not freed. Include The test programs that will be used to try out your functions and header file will be included in a single *.c file. This file will be compiled with the, "-include memcheck.h" option and the file "memcheck.c" will be added to the compile inputs. Of course, we will use the usual "-Wall -ansi-pedantic" options. You will provide (by uploading to git) the files "nemcheck.h and memcheck.c Your mencheck.h file will include 7 #detine directives that replace the calloc free malloc realloc, fe ee ee and main unctions in the and memcheck_main, respectively, as well as the prototypes for your own memcheck_* functions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions

Question

What steps should be taken to address any undesirable phenomena?

Answered: 1 week ago