/mallocFunction

Implementing a memory allocation library like malloc

Primary LanguageC

mallocFunction

Implementing a memory allocation library like malloc

  1. Declare an array of 25000 bytes.
  2. implement a function that is like malloc(). Call it MyMalloc(). Its signature is similar to malloc(). MyFree() which has a signature and functionality that are similar to free().
  3. MyMalloc() allocates memory only from the previously mentioned array of 25000 bytes.
  4. All the data structures that are required to manage the memory must also reside within the same array.
  5. MyMalloc() and MyFree() must be in a file called mymalloc.c. You should also provide a suitable header file mymalloc.h.