Question d’entretien chez Jump Trading

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

Réponses aux questions d'entretien

Utilisateur anonyme

21 oct. 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

Utilisateur anonyme

18 janv. 2017

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

1

Utilisateur anonyme

13 nov. 2016

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

5