So an example would be something like this typedef struct { //define your object, in this case it's a struct (structure - kinda like a two dimensional array) malloc(sizeof(struct a) *n) { //allocate n bits of memory to the struct printf("allocated n bits"); } free(struct) { //returning the memory back to the pool } return 0; // end the function }