Visa Inc. Interview Question

The interviewer asked me some behavioural questions and then asked me to implement malloc, calloc functions in java.