Assignment Set 5 (Uploaded on September 12, 2013) Deadline date: September 23, before lab starts Problem 1: Write a C program to do the following. Let X_1, X_2,...,X_n be a set of static arrays of different sizes. An user can call his own defined memory management functions my_malloc(size) and my_free(ptr) for allocating any amount of space from X_1,...,X_n he/she wants to allocate. If required memory is available, return a pointer to the starting address of the allocated memory, otherwise return NULL. Design a suitable data structure to handle different sized available spaces for implementing my_malloc or my_free functions. Also define some functions that shows the current snapshot of the allocated and free spaces i.e., current snapshot of X_1,...,X_n. Problem 2: [assignment to be explained in class] Write a program in C that takes as input a set of n points in 2D P={p_1, p_2, ..., p_n} and computes the convex hull of P by using the Graham's scan algorithm. ---------------------------------------------------------------------- Naming conventions for multiple files: For Problem 1: Suppose you have a file which contains "main" and the names of other files as 'x1.c', 'x1.h', 'x2.c', 'x2.h', ... then you should name them as 'august19-p1-yourname-main.c', 'august19-p1-yourname-x1.c', 'august19-p1-yourname-x1.h', 'august19-p1-yourname-x2.c', 'august19-p1-yourname-x2.h', .... ----------------------------------------------------------------------- At the top of each of your program files, add the following. If you are writing multi-file programs, then each file should have it. /*------------------------------------------------------------------ Name: Roll Number: Date of Submission: Deadline date: Program description: Acknowledgements: --------------------------------------------------------------------*/