Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

malloc free sizeof

Name: Anonymous 2012-01-13 9:51

How do I implement a simple mallow, free, and widely in ask x86?
How does free know how much to actually free?

Name: Anonymous 2012-01-13 11:12

>>1

void *malloc(size_t n) {
  //Left as an exercise for the reader
}

void *calloc(size_t n,size_t s){
  //Left as an exercise for the reader
}

void *relloc(void *p,size_t n){
  //Left as an exercise for the reader
}

void free(void *p) {
  //Left as an exercise for the reader
}

Newer Posts