#include <stdio.h>
#include <stdlib.h>
#define SIZE (1000)
#define PSIZE (SIZE/50)
/* You are not told this value */
static int block[SIZE];
static int * pointers[PSIZE];
static int valid_pointers=0;
static int counter = 0;
static int arraysize;
static count = 0;
int myfree(int * array, int *...
Im trying to create an array but refrence it as an linked list to keep track of free regions of memory in the array.
The mymalloc function is meant to find unalloacted memory (indicated by a 0) and return its address.
malloc then loops through the array return the addresses of the array that...
I need some help with a malloc function i have to write, I don't want a solution just tips on how to find a solution.
#include <stdio.h>
#include <stdlib.h>
#define SIZE (1000000)
#define PSIZE (SIZE/50)
/* You are not told this value */
static int block[SIZE];
static int * pointers[PSIZE]...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.