Pregunta de entrevista de Jump Trading

Given a char buffer[4096], write a malloc implementation.

Respuestas de entrevistas

Anónimo

21 de oct de 2020

Write the "implementation" of malloc, not malloc'ing a char[]... In general you need to record the size in this "heap", then return a pointer pointing to the block right after the size.

1

Anónimo

18 de ene de 2017

char * a = (char*) malloc ((4096 + 1)*sizeof(char))

1

Anónimo

13 de nov de 2016

char* a = (char*) malloc(4096);

5