Pergunta de entrevista da empresa Jump Trading

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

Respostas da entrevista

Sigiloso

21 de out. 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

Sigiloso

18 de jan. de 2017

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

1

Sigiloso

13 de nov. de 2016

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

5